Skip to content

Dragging elements in a rotated coordinate system #751

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

yanusa3
Copy link

@yanusa3 yanusa3 commented May 8, 2024

No description provided.

@thirstycode
Copy link

@yanusa3 are you using this forked rotated coordinate system? Is it production ready?

@yanusa3
Copy link
Author

yanusa3 commented Sep 5, 2024

@yanusa3 are you using this forked rotated coordinate system? Is it production ready?

Yes, it's working for us already. We use it in cartography.

@thirstycode
Copy link

thirstycode commented Sep 5, 2024 via email

@galangel
Copy link

why not add a description to the PR? or a gif?

@yanusa3
Copy link
Author

yanusa3 commented Feb 28, 2025

why not add a description to the PR? or a gif?

Sorry, I forgot about this

Added angle dimension
return {
node: coreData.node,
x: draggable.state.x + (coreData.deltaX / scale),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is nice; however the vast majority of usage of this library will have angle: 0, and I don't want to add overhead to every user just for this edge case. Can you clean this up so the code only runs if draggable.props.angle is 0?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants