-
-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Description
Hello!
I did not find anything where I can set up some kind of Snap to grid, e.g. for snapping to half / full or whatever-fraction-of-grid steps.
If this is true and I did not overlook something, I would have a small addition for PianoRollNoteView I could add as a PR.
Also if you don't mind, can you add the "hacktoberfest" topic to the repo? I'd like to participate with that PR :)
Proposed Solution
Add a method that "clamps" the value to a given fraction inside of the existing snap(...) method.
e.g. when clamped(n.start, 0.25) is used, it would snap to 0, 0.25, 0.5, 0.75 and 1 (and so on).
This also nicely works with the preview rectangle shown when dragging around.
Describe Alternatives You've Considered
I searched for an existing implementation in the package but did not find anything.
Additional Context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels