You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SortableJS destroys the transform CSS attribute for dragged element as well as any the drag repositions if animation > 0. If animation === 0, then the transform is only destroyed on the element being dragged.
Regardless of animation, SortableJS always destroys the transform CSS attribute for the dragged element.
I was able to work around this by setting animation to 0 and adding an onChoose event that captures evt.item.style.transform and saves it to a JavaScript variable, then setting a 200ms timeout on the onEnd function that restores transform to the original value.
I would like to be able to use animation as well.
To Reproduce
Set animation to a value > 0
Set style="transform:rotate(5deg);" to all of the elements that are being dragged.
Drag one of the elements
The rotation is removed during the drag: first, for the dragged element, then as you mouse over the others, for each element that is moved.
After dragging, all of the original CSS transform values should be restored to what they were before the drag started (including prefixes like -webkit-transform).
Describe the bug
SortableJS destroys the transform CSS attribute for dragged element as well as any the drag repositions if animation > 0. If animation === 0, then the transform is only destroyed on the element being dragged.
Regardless of animation, SortableJS always destroys the transform CSS attribute for the dragged element.
I was able to work around this by setting animation to 0 and adding an onChoose event that captures evt.item.style.transform and saves it to a JavaScript variable, then setting a 200ms timeout on the onEnd function that restores transform to the original value.
I would like to be able to use animation as well.
To Reproduce
See this fiddle: https://jsfiddle.net/4xbg670q/
Expected behavior
After dragging, all of the original CSS transform values should be restored to what they were before the drag started (including prefixes like -webkit-transform).
Information
sortablejs = ^1.15.6
@types/sortablejs = ^1.15.6
Additional context
None.
Reproduction
See this fiddle: https://jsfiddle.net/4xbg670q/
The text was updated successfully, but these errors were encountered: