Allow to get width without stave#246
Merged
rvilarl merged 2 commits intovexflow:mainfrom Sep 27, 2024
Merged
Conversation
ronyeh
reviewed
Sep 23, 2024
Member
ronyeh
left a comment
There was a problem hiding this comment.
Will a keysignature object be formatted multiple times even though it doesn't have a stave? In that situation, we are returning multiple dummy Stave objects. Is it better if the format() method creates a new dummy Stave and then call this.setStave()?
Should we log some warning in that case? Otherwise the key signature is attached to a stave that the developer never created, and it's kind of a silent failure.
Collaborator
Author
|
@ronyeh thanks! Now setStave is used with a dummy Stave and commented. I prefer the comment because it is legitimate to use format without Stave to figure out the width. |
Member
|
Is this code already run through eslint? I see some weird lack of spacing.
Between params and also before the brace.
Also I would just save the dummy stave to a local variable so that I don’t
need to call getStave().
…On Mon, Sep 23, 2024 at 10:59 PM Rodrigo Vilar ***@***.***> wrote:
@rvilarl <https://github.com/rvilarl> requested your review on: #246
<#246> Allow to get width without
stave.
—
Reply to this email directly, view it on GitHub
<#246 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAB2MCKJFJEPNEGWHWPPO73ZYD5TDAVCNFSM6AAAAABOTMF6JWVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJUGM3TKNBRGYYDGMA>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
Collaborator
Author
|
You are right I normally eslint. I will change it this evening. I will also remove the call to getStave. |
Collaborator
Author
|
@ronyeh done |
ronyeh
approved these changes
Sep 26, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #245
see stringsync/vexml#233