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

SVG content is not centered/correctly panned when scale is < 1 #3

Closed
paopre opened this issue Nov 20, 2020 · 4 comments
Closed

SVG content is not centered/correctly panned when scale is < 1 #3

paopre opened this issue Nov 20, 2020 · 4 comments

Comments

@paopre
Copy link

paopre commented Nov 20, 2020

Hello.

As you can see in this jsfiddle:

https://jsfiddle.net/pLhb419u/

... when the scale amount is < 1, the svg is resized in the left top corner. Is there a way to fix this (or at least a work around) so to see the picture resized at the mouse position or at least centered?

Thanks for your great work!

@luncheon
Copy link
Owner

Thank you. You're right. I will try to fix it.

@luncheon
Copy link
Owner

v0.3.0 has been released to fix this bug. Please give it a try.

@paopre
Copy link
Author

paopre commented Nov 26, 2020

Hello. Doesn't work yet in this way: when scale is < 1 you can't pan the drawing.
Check this:

https://jsfiddle.net/rqcn8vo5/1/

Also: I suggest you to add borders in your examples, both in the drawing and in the container. Otherwise it's impossible to figure what's happening.
Also: I suggest you to have a look at this:

https://github.com/timmywil/panzoom

with the 'overflow' property set, which creates scrollbars. It will help you in understanding how to manage the discussed case

@luncheon luncheon reopened this Nov 27, 2020
@luncheon
Copy link
Owner

OK, panning is implemented when scale < 1 on v0.4.0. Thank you.

@luncheon luncheon closed this as completed Mar 7, 2021
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

2 participants