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

add style object basics from music21 #158

Merged
merged 4 commits into from
Dec 18, 2021
Merged

add style object basics from music21 #158

merged 4 commits into from
Dec 18, 2021

Conversation

mscuthbert
Copy link
Member

lets .style.hideObjectOnPrint work on clefs, ts, ks.

Leaves extra space on the Stream however for the hidden objects. A to-do for later

Screen Shot 2021-12-18 at 07 59 03

Copy link
Member

@jacobtylerwalls jacobtylerwalls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super!

Some nitpicks you can feel free to ignore.

Leaves extra space on the Stream however for the hidden objects. A to-do for later

I'm not sure we need to bother. Setting .renderOptions.displayTimeSignature = false should take care of the spacing issue (as well as display, without having to resort to hideObjectOnPrint AFAIK). If someone wants to hide something, I think intuition could cut either way re: whether to alter the spacing--someone might want to just drop in their own element at that location.

src/base.ts Outdated Show resolved Hide resolved
src/stream.ts Outdated Show resolved Hide resolved
src/stream.ts Outdated Show resolved Hide resolved
src/style.ts Outdated Show resolved Hide resolved
src/style.ts Outdated Show resolved Hide resolved
@mscuthbert
Copy link
Member Author

Right now, the issue is that renderOptions.displayClef gets overwritten every time the Stream's position is recalculated, so until we separate out renderOptions from style, we can't just rely on users setting renderOptions.

@jacobtylerwalls
Copy link
Member

renderOptions.displayClef gets overwritten every time the Stream's position is recalculated

Ah right, okay, sounds like #135. Got it.

@mscuthbert mscuthbert merged commit c2a18be into master Dec 18, 2021
@jacobtylerwalls jacobtylerwalls deleted the style-hide branch December 19, 2021 01:04
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