Skip to content

Zooming in and out two images at the same time - is it possible? #61

Answered by nerdyman
kimohyeong asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @kimohyeong, thanks for opening the issue.

I think this is outside the scope of the library as it's a very specific use case. It's a cool idea and I'm open to adding a demo using third party libraries to Storybook but don't think it should be built into the library.

It's totally possible to do though, you would just need to handle the logic yourself. People have done similar things with Mapbox https://coronavirus.data.gov.uk/details/interactive-map/vaccinations

I'd recommend looking at something like https://www.npmjs.com/package/react-zoom-pan-pinch and use their event handlers to keep both images in sync. For example, you could store the state of the current zoom level and position …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by nerdyman
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
Converted from issue

This discussion was converted from issue #60 on November 23, 2021 09:48.