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
299 stars 118 forks source link

Wrong offset when using dndHandle with polyfill on mobile #70

Closed nekkon closed 2 years ago

nekkon commented 5 years ago

Hello thanks for making this library. Has been useful so far. I have an issue when dragging on a mobile device.

I am trying to use the dndHandle while using the polyfill for mobile devices. When dragging dndHandle the element that appears as I am dragging does not appear at the right position. It is 50% on the left of its width from the handle. The handle is on the left, so the dragging element appears half.

The above functionality works fine on desktop. Any suggestions on how to solve this? Thanks in advance. I have attached a screenshot. Feel free to ask for any info that might help things out.

drag bug

reppners commented 4 years ago

Welcome and sorry for the long delay.

This is most likely an issue with specific css involved in the elements that are dragged. There are most likely ways to work around those styling issues but I need a reproduction to help you with that. I've used dndHandle with the polyfill for mobile devices and was able to overcome any layout issues. Unfortunately theres no one size fits all way of handling all the possible css variations that can be solved at the library/polyfill level.