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

Wrong calculations with responsive svg and viewBox instead of width and height #10

Open
meyerp opened this issue Feb 19, 2020 · 0 comments

Comments

@meyerp
Copy link

meyerp commented Feb 19, 2020

Hi,

I can't make it working properly when my svg is responsive, I mean without explicitly giving width and height attributes but just giving a viewBox in a div container.

In that case, the plugin works well with x and y values in the viewBox coords for the text positioning, but other options like width and maxHeight are displaying wrong.

I so tried to give the x and y values in the viewBox coords system and the width and maxHeight of the bounds of the text in real screen pixels dimensions, that works, but not for alignment like vAlign that give a wrong translate(a,b) for multilines, so the text box is not well positioned.

Could you help me ? Do you have a demo with responsive svg and viewBox ?

Thanks a lot

Pierre M

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

No branches or pull requests

1 participant