Skip to content

Rotate and Delete from the ground up #660

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 17 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
rotate rotation icon with rotation degrees
  • Loading branch information
hchiam committed Mar 19, 2025
commit 8c175588a00e4de1a7b822be606ea8f44af7df4c
6 changes: 5 additions & 1 deletion app/components/selection/rotation.element.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ export class Rotation extends HTMLElement {
this.currentAngle += rotation
this.startAngle = angle

this.targetElement.style.transform = `rotate(${this.currentAngle * (180 / Math.PI)}deg)`
const rotationDegrees = this.currentAngle * (180 / Math.PI)
this.targetElement.style.transform = `rotate(${rotationDegrees}deg)`

const handle = this.$shadow.querySelector('.rotation-handle')
handle.style.transform = `rotate(${rotationDegrees}deg)`
}

const onMouseUp = () => {
Expand Down