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

[Feature] shape rotation #1303

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

[Feature] shape rotation #1303

wants to merge 7 commits into from

Conversation

ndgnuh
Copy link

@ndgnuh ndgnuh commented Aug 1, 2023

What has changed

  • Add rotateCenter and rotateCenterBreak to Shape. rotateCenter rotate and keeps the shape, while rotateCenterBreak breaks the rectangle to create a quadrangle, then rotate it. The rotate action is a no-op on circles and points.
  • Modify the canvas to rotate the shape when the mouse scroll and there are selected shapes. If the condition is not met, the scrolling falls back to the previous behavior.
  • Add undo for scroll actions.
  • Modify canvas and app to block the scrolling when rotating the shapes.

The shortcut:

  • No modifier: rotate the shape 5deg.
  • Shift modifier: rotate and break the shape.
  • Ctrl modifier: rotate 30deg.

Screencap example:

labelme-rotate.mp4

@VShawn
Copy link

VShawn commented Apr 8, 2024

LGTM

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.

None yet

2 participants