fatlinesofcode / ngDraggable

Drag and drop module for Angular JS
MIT License
630 stars 399 forks source link

Performance optimization by reducing Reflow + PR #156 (Option not to move original element) #250

Closed homoluden closed 5 years ago

homoluden commented 8 years ago

In last commit I implemented caching for getBoundingClientRect() and scrollLeft / scrollTop. Getting these values force the browser to perform DOM elements reflow.

Caching performed on Drag Start for elements marked with ng-drag='true'.

Also, in first commit I integrated PR# 156 + added element positioning relatively to pageX / pageY. Now I'm able to show drag icong relatively to the mouse cursor.

Note: please turn on ignoring of whitespaces in diff tool ;) I messed up diff with indentation. My bad.. sorry.