AshesOfOwls / jquery.shapeshift

A dynamic grid system with drag and drop functionality.
http://ashesofowls.github.com/jquery.shapeshift/
MIT License
1.67k stars 312 forks source link

Fire up event after ss-event-arange has stopped working #24

Closed nicksp closed 11 years ago

nicksp commented 11 years ago

Hi. I need to set up a variable after my element has stopped arranging. Sadly, ss-event-dropped event is not the last one, so that i can't set my variable there. How can we handle such situations?

A quick snippet of what i am saying about: $itemGroup.on("ss-event-arrange", function(e, selected) { // Some operations <..> // It's not overriden by ss-event-dropped handler isHandlerActive = true; });

$itemGroup.on("ss-event-dropped", function(e, selected) { // isHandlerActive expected to be false. But it's true ;( <...> isHandlerActive = false; });

AshesOfOwls commented 11 years ago

I am releasing v2.0 tonight, I will work a solution into the release.

AshesOfOwls commented 11 years ago

This has been included in v2.0, you can listen to the new event "ss-drop-complete" on the container that the drop finished in. You can read more and see examples once 2.0 is live.

nicksp commented 11 years ago

Thanks. This is what i needed.