     @labels             = []
 
   createHandles:->
-    for k, v of @getData().handles
-      @handles.push @addSubView handle = new KDSliderBarHandleView
-          name : k
-        , value: v.value
+    for name, {value} of @getData().handles
+      @handles.push @addSubView handle = new KDSliderBarHandleView {name}, {value}
 
     sortRef = (a,b) ->
       return -1 if a.getData().value < b.getData().value

      @snap() if @parent.getOption "snap"

  getPosition:->
    maxValue = @parent.getOption('maxValue')
    minValue = @parent.getOption('minValue')
    value    = @getData().value

    return ((value-minValue)*100)/(maxValue-minValue)

  setValue:(value)->
    leftLimit     = @getData().leftLimit
    rightLimit    = @getData().rightLimit

    if !(value<leftLimit) and !(value>rightLimit)
      @data.value = value

class KDSliderBarView extends KDCustomHTMLView
  constructor:(options = {}, data = {})->

    options.cssClass    = KD.utils.curryCssClass "sliderbar-container", options.cssClass
    options.minValue   ?= 0
    options.maxValue   ?= 100
