ducksboard / gridster.js

gridster.js is a jQuery plugin that makes building intuitive draggable layouts from elements spanning multiple columns
http://gridster.net/
MIT License
6.03k stars 1.2k forks source link

Logic on collision.on_overlap_start and collision.on_overlap_stop backwards #281

Open msvanvertloo opened 10 years ago

msvanvertloo commented 10 years ago

In jquery.collision.js: manage_colliders_start_stop(), the logic for determining whether a coord should be sent to a start callback or a stop callback is wrong. Coords sent to the start callback are ones found in the 'last' list, but not in the new one. The stop callback coords are similarly wrong.

If you swap which callback is used in each of those loops, it will work as designed.