You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// reposition the controls
const controls = document.querySelector('g[id="svg-pan-zoom-controls"]');
//get height and width of svg
const svgHeight = svg.getBoundingClientRect().height;
const svgWidth = svg.getBoundingClientRect().width;
//set the controls to be 15% from the top of the svg and 100px from the right
controls.setAttribute('transform', 'translate(' + (svgWidth - 100) + ', ' + (svgHeight * 0.15) + ')');
I also wrap this in a function that fires on window resize.
Hi!
Amazing work - thank you so much. A small question: how to re-position the zoom controls to the top-left ?
I found this #312 (comment) and I think the custom controls approach is what I need, but the link to the example is broken.
Thanks for any help,
David
The text was updated successfully, but these errors were encountered: