reppners / ngx-drag-drop

Angular directives using the native HTML Drag And Drop API
https://reppners.github.io/ngx-drag-drop/
BSD 3-Clause "New" or "Revised" License
300 stars 119 forks source link

Move dragenter/dragleave events outside the angular zone #19

Closed mtraynham closed 6 years ago

mtraynham commented 6 years ago

This is very similar to #13. I was doing some more diagnosis of performance with the library and I believe these two events would be beneficial to move outside the Angular Zone as well. It seems that dragEnter/dragLeave get called on any element that supports pointer events (e.g. that can be turned off with CSS pointer-events: none). I couldn't find any necessity within the functions to trigger change detection, so I believe it's fairly safe.

reppners commented 6 years ago

Agreed! Thanks for your contributions 👍