JuliaGizmos / Escher.jl

Composable Web UIs in Julia
https://juliagizmos.github.io/Escher.jl
Other
337 stars 63 forks source link

Slider while dragging #147

Closed mfalt closed 8 years ago

mfalt commented 8 years ago

I'm trying to make some additions but am struggling to understand the code, and I received no help on gitter.im (and the webpage http://escher-jl.org/behavior-api.html is failing under firefox). I want to add an option to make the slider update while the user is dragging. It is possible to do

wrapbehavior(s::Slider) =
    intent(ToType{eltype(s.range)}(), hasstate(s, attr="immediateValue", trigger="immediate-value-change"))

in src/library/widgets.jl, but then it doesn't trigger on a normal "change". I am not able to understand how to add multiple triggers and how to then handle the data, does anyone have any pointers?

shashi commented 8 years ago

replied on gitter. I think we need some enhancement to hasstate to support this. it is possible to use collector to get this now I think.

izaid commented 8 years ago

I have made an attempt to fix this with https://github.com/shashi/Escher.jl/pull/178