Vexflow: Setting accidental color

Created on 24 Nov 2019  路  5Comments  路  Source: 0xfe/vexflow

Hi!

I'm wondering if there is any possibility to set color on particular accidentals.
I see that I can do something like
notes[0][2].setStyle({fillStyle: "blue", strokeStyle: "blue"})
but this is setting color also on note head and stem

Most helpful comment

Hi!

https://jsfiddle.net/njyfs5xv/ with the current master branch, the modifier style is applied at render time (#693) as follows:
image

But last release binaries does not contains #693. orz...

All 5 comments

It doesn't seem to be possible currently.
I've tried using setStyle on an Accidental, but it doesn't do anything.
(Accidental extends Modifier which extends Element which has setStyle)

It seems like Vexflow should check the style of a modifier and store it to context before drawing (then restore).

sample:
https://jsfiddle.net/njyfs5xv/

Hi!

https://jsfiddle.net/njyfs5xv/ with the current master branch, the modifier style is applied at render time (#693) as follows:
image

But last release binaries does not contains #693. orz...

But last release binaries does not contains #693. orz...

so we should release!

@mscuthbert @0xfe did you see the comment i made about how to give npm release permissions? @mscuthbert you'd just have to give 0xfe your npmjs user name.
https://github.com/0xfe/vexflow/pull/721#issuecomment-577751363
(a minute before i wrote this 0xfe did answer there ^^)

Okay, version 1.2.90 released from master.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sug1no picture sug1no  路  6Comments

sug1no picture sug1no  路  7Comments

amitgur picture amitgur  路  4Comments

graciano picture graciano  路  4Comments

Silverwolf90 picture Silverwolf90  路  4Comments