panzoom icon indicating copy to clipboard operation
panzoom copied to clipboard

HTMLElements and SVG elements move in different directions

Open davidbcoulson opened this issue 3 years ago • 2 comments

Thank you for the amazing library! I have a combination of HTMLElements and SVG elements and I am finding that when I use the zoom both types of elements seem to move away from each other, breaking their original grouping display.

when it loads (HTMLElements are the cards SVG are the arrows) image

when I zoom out the HTML elements seem to go backward which is great but the SVG elements seem to also move backward and left. This is causing

image

Please let me know if I missed something Here is my code as well to help.

setPanZoom() { var element = document.getElementById(this.workingLevel.toString()) panzoom(element) var everyChild = document.querySelectorAll("svg.leader-line"); everyChild.forEach(x => { panzoom(x) }) }

davidbcoulson avatar Jan 08 '22 17:01 davidbcoulson

Looks like something specific to they way this is rendered - can you please share a minimal jsbin/jsfiddle to reproduce?

anvaka avatar Jan 08 '22 19:01 anvaka

@anvaka you are right I am using LeaderLine and just found out they are rendered over the page. I will need to hack it some way else thank you for the quick response.

davidbcoulson avatar Jan 08 '22 20:01 davidbcoulson