-
Notifications
You must be signed in to change notification settings - Fork 25
Description
Describe the bug
With the following configuration:
panZoomConfig: PanZoomConfig = new PanZoomConfig({
panOnClickDrag: true,
zoomOnDoubleClick: true,
zoomOnMouseWheel: true,
initialZoomLevel: 5,
});
Calling api.zoomOut() initially works, but then right afterward calling api.zoomIn() does not do anything. Calling api.zoomIn() initially actually causes it the image to zoom out.
It behaves as expected with { initialZoomLevel: 3 }, but not with { initialZoomLevel: 5 }
Reduced Test Case
https://stackblitz.com/edit/ngx-panzoom-test-10-2-s6zgpf
To Reproduce
Steps to reproduce the behavior:
- Click Zoom In button
- Observe it actually Zooms Out
- Refresh the page
- Click the Zoom Out button
- Click the Zoom In button
- Observe it stays at the current Zoom level
- Click Zoom Out button again
- Click Zoom In button again
- That works as expected
Expected behavior
I expect api.zoomIn to always Zoom In at up to some limit (e.g. initial zoom).
I expect to be able to get back to the initial zoom level by using api.zoomIn.
Screenshots
Not applicable
Desktop (please complete the following information):
- OS: Ubuntu 20.04
- Browser: Chrome
- Version: 114.0.5735.198 (Official Build) (64-bit)
Smartphone (please complete the following information):
N/A
Additional context
N/A