question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The element's original transform properties are discarded while dragging

See original GitHub issue

In 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:open
  • Created 8 years ago
  • Reactions:12
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
cstollicommented, Apr 27, 2016

👍 really need this!

1reaction
dthebcommented, Mar 31, 2016

is this implemented yet?? i need this feature to implement scaling/zoom effect 😢

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found