-
Beta Was this translation helpful? Give feedback.
Answered by
fancyapps
Aug 16, 2021
Replies: 1 comment 1 reply
-
Hi, This way you can access the current slide and the Panzoom instance created by the image plugin - Fancybox.getInstance().getSlide().Panzoom You can then call any Panzoom method (zoomIn()/zoomOut()/toggleZoom()), example: Fancybox.getInstance().getSlide().Panzoom.toggleZoom(); Those buttons are created by Controls plugin of the Panzoom and it is not included by default. Simply include appropriate CSS and JS files and then register the plugin -
Demo - https://fancyapps.com/playground/zY But I think you might better want to add zoom in/out buttons in the toolbar, see this demo - https://fancyapps.com/playground/zZ |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
wlsquid
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
This way you can access the current slide and the Panzoom instance created by the image plugin -
You can then call any Panzoom method (zoomIn()/zoomOut()/toggleZoom()), example:
Those buttons are created by Controls plugin of the Panzoom and it is not included by default. Simply include appropriate CSS and JS files and then register the plugin -
Demo - https://fancyapps.com/playground/zY
But I think you might better want to add zoom in/out buttons in the toolbar, see this demo - https://fancyapps.com/playground/zZ