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 divlines jumping to wrong staff lines. #882

Merged
merged 3 commits into from
Jun 20, 2022

Conversation

jinh0
Copy link
Collaborator

@jinh0 jinh0 commented Jun 17, 2022

Fixes #864 .

Demo:

Screen.Recording.2022-06-15.at.3.26.49.PM.mov

- Give more accurate typing for dragStartCoords, tuple of 2 numbers.
- Get rid of unused variables relativeX/Y, and use arrow functions instead of regular functions to pass down `this` correctly.
- Reformat longer function chain calls to be more readable, according to the ESLint / Prettier standard.
When dragging and dropping a divline or an accidental, the staff the cursor is over is calculated, and a call to a new editor action called changeStaffTo is called.

This fixes the issue of divlines weirdly jumping to another staff due to our default changeStaff() function.
@jinh0 jinh0 requested a review from yinanazhou June 17, 2022 15:57
@yinanazhou yinanazhou merged commit 240a4e0 into develop Jun 20, 2022
@jinh0 jinh0 deleted the change-staff-to-fix branch July 14, 2022 18:01
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.

2 participants