taye / interact.js

JavaScript drag and drop, resizing and multi-touch gestures with inertia and snapping for modern browsers (and also IE9+)
http://interactjs.io/
MIT License
12.38k stars 785 forks source link

Events to highlight possible dropzones on dragstart #54

Closed mikekloeden closed 10 years ago

mikekloeden commented 10 years ago

I'm currently working on an editor where you have a list of draggable elements which can be dropped to multiple places (aka dropzones) within the page. It works totally great so far.

But I would like to highlight the possible dropzones on the page when the user starts dragging.

At the moment there are only events for dragenter, dragleave and drop at the dropzone. So I can only highlight it when an accepted draggable is already right over the dropzone.

jQuery UI droppable provides such callbacks: dropactivate and dropdeactivate.

I think these two events would be a great benefit for interactjs!

Also you may have an idea how to achieve this right?

taye commented 10 years ago

Yeah, this would be great to have and it shouldn't be difficult to implement.

Thanks for the suggestion!