PuruVJ / neodrag

One Draggable to rule them all 💍
https://neodrag.dev
MIT License
1.61k stars 48 forks source link

Recalculate Transform Style onMouseDown #124

Open SabariVig opened 1 year ago

SabariVig commented 1 year ago

Hey I am writing a tiny svelte library which changes size of the elements for which I change transform style of the element, I also rely on this library to drag elements around for a different project. When I change transform style externally it doesn't move from that position rather from last dragged position

PuruVJ commented 1 year ago

Hey I am writing a tiny svelte library which changes size of the elements for which I change transform style of the element, I also rely on this library to drag elements around for a different project. When I change transform style externally it doesn't move from that position rather from last dragged position

If i understand correctly, your own transform: rules are overriding neodrag's transformations? If that's the case, check out legacyTranslate or transform option in the docs

SabariVig commented 1 year ago

Thanks, that fixed it. But wouldn't it still cause problems later down the line when a different library changes translate externally. Feel feel free to close this issue