Closed AntsyLich closed 1 day ago
Agreed, the current spec is not the best for super large images. I need to think of a good API for letting consumers adjust this. Do you have any ideas?
Without giving much thought my idea is that you add the zoom levels to zoom spec and maybe keep the current setup as a extra constructor for people who don't need them to be sperate
The next release will introduce an API for overriding the default double click behavior:
Can we have maxDoubleTapZoomFactor
in ZoomSpec
? The current implementation works but having both values in ZoomSpec
in my opinion will result in less repetitive code across the eco-system.
You're right that having a maxDoubleTapZoomFactor
parameter will be easier, but it will also prevent developers from building other, more complex kinds of double-tap interactions, such as cycling through three levels of zoom.
I wanted to add another DoubleClickToZoomListener
implementation that takes a maxZoomFactor
as an argument, but I couldn't think of a good name lol. Suggestions are welcome!
So when user double taps they'll get a 3x zoom but will be able to zoom upto 5x by pinching