Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draggable is not compatible with rotation #60

Open
GMartigny opened this issue Sep 12, 2019 · 0 comments
Open

Draggable is not compatible with rotation #60

GMartigny opened this issue Sep 12, 2019 · 0 comments
Labels
🐛 bug Something isn't working 🙏 help wanted Extra attention is needed

Comments

@GMartigny
Copy link
Member

Information

  • Your current navigator: Chrome v76
  • The package and version you used: @pencil.js/[email protected]

Description

When a component is rotated (by itself or any of its parents) the draggable package will produce unexpected result. This impact other package like resizable and Slider that use draggable and prevent them to work when rotated.

A solution might be to climb the component ancestry to compute its absolute rotation and act accordingly in draggable.js.

Reproduce by

const circle = new Circle(scene.center, 200, {
    rotation: 0.25,
    fill: "red",
});

const square = new Square(undefined, 200);
square.draggable();
circle.add(square);

scene.add(circle);
@GMartigny GMartigny added 🐛 bug Something isn't working 🙏 help wanted Extra attention is needed labels Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 🙏 help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant