question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Arrows scaling changes when using zoomable-UI.

See original GitHub issue

Hello,

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:open
  • Created 2 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

2reactions
metzy23commented, Nov 15, 2022

I’m also having this problem. It works fine when I use zoom instead of transform: scale(), but from what I understand, it is not a good idea to use zoom. Can someone share an example of a working solution using transform: scale()?

1reaction
m3schrodercommented, Jul 25, 2022

@chakeson Yes I did 1/scale instead of just scale

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found