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

Fix note resizing behavior #405

Merged
merged 19 commits into from
Sep 15, 2024
Merged

Fix note resizing behavior #405

merged 19 commits into from
Sep 15, 2024

Conversation

ryohey
Copy link
Owner

@ryohey ryohey commented Sep 15, 2024

A regression was occurring in the ability to resize multiple notes at the same time when in pencil mode. While fixing this, the handling of moving and resizing notes and selections has been overhauled.

PianoRollDraggable

The left, center, and right ends of notes and the left, center, and right ends of selections are represented by the concept PianoRollDraggable, respectively. The PianoRollDraggable can be retrieved and updated from the PianoRollStore.

For example, an operation that changes the length of a note by dragging its right edge corresponds to moving the PianoRollDraggable on the right edge of the note.

moveDraggableAction

Move operations are unified into moveDraggableAction. The moveDraggableAction allows you to move the PianoRollDraggable you want to move, and multiple PianoRollDraggables associated with it, simultaneously by dragging. Each PianoRollDraggable has its own movement limit, and the range of movement is adjusted according to the position of the selected notes, etc. to prevent inappropriate movement.

Temporary quantization disablement

Also, while it has been possible to temporarily disable quantize by pressing the Shift key when adjusting note size, I have added this functionality to moveDraggableAction so that quantize can be disabled by pressing the Shift key during any move or resize.

Copy link

vercel bot commented Sep 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
signal ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 15, 2024 3:01am

@ryohey ryohey changed the title Fix selection move Fix note resize behavior Sep 15, 2024
@ryohey ryohey changed the title Fix note resize behavior Fix note resizing behavior Sep 15, 2024
@ryohey ryohey merged commit d6aa1cc into main Sep 15, 2024
3 checks passed
@ryohey ryohey deleted the fix-selection-move branch September 15, 2024 12:47
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.

1 participant