         .attr("class", "btn btn-mini")
         .html("&times;")
         .on "click", -> 
-          parent.selectAll("input").property("checked", false)
           fire "applyFilter", null
 
 

      .text((d) -> d.key)
      # .on "click", ->  d3.select(this.parentElement).select("input")[0][0].click()


    parent.select("div.bands").selectAll("div.horizon")
      .sort((a, b) -> d3.descending(a.values.extent[1], b.values.extent[1]))

    horizonsEnter = horizons.enter()
      .append("div")
        .attr("class", "horizon")
        .on "click", -> 
          unless d3.event.target?.type is "checkbox"
            d3.select(this).select("input")[0][0].click()

    horizonsEnter.append("canvas")
      .attr("width", width)
