-
Notifications
You must be signed in to change notification settings - Fork 662
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: Allow getting all staff modifiers by category, without position #728
Conversation
src/stave.js
Outdated
@@ -337,6 +337,9 @@ export class Stave extends Element { | |||
clefs[0].setType(clefSpec, size, annotation); | |||
} | |||
|
|||
const keySignatures = this.getModifiers(position, KeySignature.CATEGORY); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two lines look unrelated to the PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, this was my attempt to fix #727. Will remove
|
||
return this.modifiers.filter(modifier => | ||
position === modifier.getPosition() && | ||
(position === undefined || position === modifier.getPosition()) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks safe, but I'm hesitant to accept without making sure that there were no diffs in the visual regression tests. Can you confirm please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@0xfe Any suggestions on how I can confirm these tests pass? Having issues getting setup to run locally.
npm install + npm test:
Not sure what I'm doing wrong... but the tests ran ok
|
This was a broken build config. Closing and reopening to trigger a rebuild. |
Looks good. Merging. Thanks! |
currently, if you want to getModifiers by category, you HAVE to have a position. This seems silly.