slider.value < number>

The value of the slider. Set to 0.5 by default.
译:滑块的值。默认设置为0.5。

# Create a SliderComponent  
slider = new SliderComponent
slider.center()

# Print the current value 
print slider.value

You can listen to any value changes with the "change:value" event. This is useful for retreiving the value or mapping it to another layer property, like changing the opacity of a layer with the slider.

slider.on "change:value", ->
    print this.value

results matching ""

    No results matching ""