Closed JDMCreator closed 12 months ago
It seems this bug only occurs on Firefox and is caused by this unresolved bug. As InfiniteViewer uses transform
on a parent element, the values generated by .getScreenCTM()
will be incorrect on Firefox. There is no solution for this problem, but I fixed this issue on my side by not using the viewBox
attribute of <svg>
.
First, thank you for this very useful library. My problem is the following: Whenever we need to convert screen coordinates to SVG coordinates, we use something like this:
However, it does not seem to work when the SVG element is inside infinite-viewer. Adjusting the mouse coordinates with
.getScrollLeft()
and.getScrollTop()
doesn't help. How can I convert mouse coordinates to coordinates of a SVG element inside infinite-viewer?