ovidiuch / dragdealer

Drag-based vanilla JS component
http://ovidiuch.github.io/dragdealer
MIT License
1.05k stars 149 forks source link

Revert to original position on release #95

Closed jolleman closed 9 years ago

jolleman commented 9 years ago

Hi!

I have a handle centered with x and y 0.5 i would like them to be centered again on mouseup. Is there a way to do this?

regards Joel

ovidiuch commented 9 years ago

You can use the dragStopCallback callback to capture the mouse up event and then use setValue(0.5, 0.5)