Zoom to particular position based on search result of editor text #194
-
Hi @chrvadala, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi guys, did you try the An example is available here https://chrvadala.github.io/react-svg-pan-zoom/?path=/story/react-svg-pan-zoom--call-methods |
Beta Was this translation helpful? Give feedback.
Hi guys, did you try the
fitSelection()
method. This functionality accepts a rect of the area that you want to show and library will arrange zoom and pan automatically. You can provide your image coords and the library will perform the hard calculation for you, so you don't have to worry about the math behind the matrix.An example is available here https://chrvadala.github.io/react-svg-pan-zoom/?path=/story/react-svg-pan-zoom--call-methods