Skip to content

The element's original transform properties are discarded while dragging #92

@wugangca

Description

@wugangca

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,

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions