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

Feature: SVG Scaling to parent #722

Open
mix3d opened this issue Nov 10, 2019 · 7 comments
Open

Feature: SVG Scaling to parent #722

mix3d opened this issue Nov 10, 2019 · 7 comments
Labels

Comments

@mix3d
Copy link
Contributor

mix3d commented Nov 10, 2019

Using gristow@fbf3c78 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...

@davidedelvento
Copy link

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!

@mix3d
Copy link
Contributor Author

mix3d commented Apr 26, 2020

I posted that 6 months ago... You might need to fork.

@davidedelvento
Copy link

@mix3d Thanks. I did notice the date, but sometimes conversations happen on a side channel, so I wanted to check.

@ronyeh ronyeh added the future label Oct 1, 2021
@ronyeh
Copy link
Collaborator

ronyeh commented Oct 1, 2021

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.)

@davidedelvento
Copy link

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)

@rvilarl
Copy link
Collaborator

rvilarl commented Apr 4, 2023

@nathan-kerr
Copy link

I've read the docs/issues (including https://github.com/0xfe/vexflow/wiki/Understanding-Renderer-&-Context) trying to figure out how to scale the SVG to parent, but I'm still struggling.

Please implement this feature and add further documentation showing how to manipulate the SVG for common usage. The fiddles could demonstrate scaling the score (with parent, and separately) as well as centering it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants