The element's original transform properties are discarded while dragging
See original GitHub issueIn the “positionDrag” function, it replace the transform style with only translate(…) and in the “dragEnd” and “destroy” functions, it empties the transform style. If the element previously has some transform styles, e.g. rotate, scale, they will be lost. Please update the code like
In positionDrag, keep the original transform styles except translate: var transform = this.element.style[ transformProperty ]; transform = transform.replace(/translate(3d)?(.*)/, ‘’); this.element.style[ transformProperty ] = transform + translate( this.dragPoint.x, this.dragPoint.y );
After drag, keep the original transform styles except translate
var transform = this.element.style[ transformProperty ];
transform = transform.replace(/translate(3d)?\(.*\)/, '');
this.element.style[ transformProperty ] = transform;
Thanks,
Issue Analytics
- State:
- Created 8 years ago
- Reactions:12
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Dragging and Dropping onto a scaled element - Stack Overflow
When the parent of an HTML element changes (i.e. the element is appended to some other element), its position on the screen changes,...
Read more >transform on parent messes up dragging positioning #128
The problem itself is that when an item (in this case the nested list) gets transformed, that element becomes the new target container...
Read more >Drag'n'Drop with mouse events - The Modern JavaScript Tutorial
Drag 'n'Drop is a great interface solution. Taking something and dragging and dropping it is a clear and simple way to do many...
Read more >Drag and drop UI elements in Flutter with Draggable and ...
In simple terms, a drag-and-drop interaction occurs when the user selects an item, drags it to another point on the screen, and then...
Read more >Transform objects in Photoshop - Adobe Support
When transforming any layer type, dragging a corner handle now scales the layer proportionally by default, indicated by the Maintain Aspect ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
👍 really need this!
is this implemented yet?? i need this feature to implement scaling/zoom effect 😢