Skip to content

Zoom to particular position based on search result of editor text #194

Answered by chrvadala
abhinay4512 asked this question in Q&A
Discussion options

You must be logged in to vote

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

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by chrvadala
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants