Arrows scaling changes when using zoomable-UI.
See original GitHub issueHello,
Issue: When using zoomable-UI, resizing the window each Xarrow seems to change height and width. Thus breaking the arrow links.
Example: Here is a sandbox with it https://codesandbox.io/s/xarrows-and-zoomable-ui-83t0kh?file=/src/App.js When you resize the window it detects it and renders them incorrectly.
What I tried:
I tried forcing renders as in issue #30, doesn’t seem to work.
Setting the SVGcanvasStyle as in issue #94 does not work either. Tried SVGcanvasStyle={{transform: "scale(1)"}}
as well.
Calling updateXarrow()
on resizes doesn’t seem to work either.
Moving it out of the Zoom-move element negates the use of it.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:5
Top Results From Across the Web
Arrows scale incorrectly after zoom change and element is ...
I looked deeply in your case, it seems that 'react-zoom-pan-pinch' is scaling everything, but the arrow calculates the path after the scaling, and...
Read more >Matplotlib: How do I scale a quiver plot while zooming?
The arrows scale differently depending on the units. For 'x' or 'y', the arrows get larger as one zooms in; for other units,...
Read more >ARROW TIPS GET BIGGER WHEN ZOOMING OUT/away
They have a constant size relative to the screen and do not change with the zoom level, which is why they appear to...
Read more >zoomScale | Apple Developer Documentation
A Boolean value that determines whether the scroll view animates the content scaling when the scaling exceeds the maximum or minimum limits.
Read more >Adjust your zoom and view options – Figma Help Center
Note: It is still possible to place layers on sub-pixel values when using the Scale tool. Pixels and resolution. Both your browser and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m also having this problem. It works fine when I use
zoom
instead oftransform: scale()
, but from what I understand, it is not a good idea to usezoom
. Can someone share an example of a working solution usingtransform: scale()
?@chakeson Yes I did 1/scale instead of just scale