vexflow
vexflow copied to clipboard
Feature: SVG Scaling to parent
Using https://github.com/gristow/vexflow/commit/fbf3c782509aca357f0d6cf136480ac4b990a779 and the SVG interactions defined in #371 , to create a staff that scales to it's parent size, without needing to call renderer.resize() all the time.
Yes this won't be compatible with Canvas, but SVG is superior anyways soooo...
To plan my usage of vexflow, I would like know if there is any plan to implement this in vexflow sometimes soon, or if I should find my own workarounds. Thanks!
I posted that 6 months ago... You might need to fork.
@mix3d Thanks. I did notice the date, but sometimes conversations happen on a side channel, so I wanted to check.
Can you clarify what you mean? Do you mean that the VexFlow SVGContext is on a responsive webpage, so that as the parent DOM element resizes, the VexFlow score will also resize appropriately? Do you have a demo of it working? (Since this is almost 2 years ago now, I assume you might have already implemented it on your own fork.)
I needed simply the staff to fill the available size, on a phone/table. I eventually had it to work just using what was available. I don't remember anything else since this is so old (I am not currently working on that project, at the moment)
If we draw a background element this could help
https://stackoverflow.com/questions/19484707/how-can-i-make-an-svg-scale-with-its-parent-container