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 horizontal connectors breaking on zooming out #67

Closed
shefaligupta opened this issue Apr 18, 2023 · 3 comments
Closed

SVG horizontal connectors breaking on zooming out #67

shefaligupta opened this issue Apr 18, 2023 · 3 comments

Comments

@shefaligupta
Copy link

Hi Remco, Kudos for writing this one. :)

I have been using this for my current work. I have also added a minimap with this and some zoom features. But as soon as I zoom out to less than 1, the horizontal lines start breaking.

Screenshot 2023-04-18 at 11 34 07 AM

Do you know a way to fix this?

@maxganiev
Copy link

maxganiev commented May 3, 2023

@shefaligupta hi, did you find the solution? I got the same problem with transform:scale. this seems to be a workaround, but browser support for css zoom is not really good in terms of cross-browserness.

Lines zoom and scale recalculating each time zoomer value changes (transform: scale value changes)

image

@shefaligupta
Copy link
Author

@maxganiev - fixed it by only using zoom on the parent container instead of transform.
this.$refs.flowWrapper.style.zoom = 1;
Screenshot 2023-10-14 at 4 10 52 PM

@maxganiev
Copy link

@shefaligupta zoom has poor cross-browser compatibility, and is non-standard feature that is not recommended to use in production https://developer.mozilla.org/en-US/docs/Web/CSS/zoom
if you don't mind that - zoom can be an option, though it has bugs when drawing large schemas.

fyi, if you need cross-browser solution tested on large schemas - more than welcome to my repo (this is now moved to production and connected to real backend service)
https://github.com/maxganiev/flowy-draggable-vue
demo: https://schema-draggable.netlify.app/

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