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
I had a problem with zooming to the mouse position when an svg isn't rendered at the top left corner of the browser but somewhere else in the document.
(See also #132, which contains an example of the current behavior)
I traced it down to the transformToScreen method, where getScreenCTM is used. getScreenCTM returns the offset of the svg to the top and left corner of the document and from there on calculates all positions using this offset.
But the "zero point" of the svg is still at 0/0 - the offset isn't necessary and shouldn't be used at all.
When replacing the value of the following lines with 0, everything works as expected: