Three view-control plugins loaded together — each adds its own toolbar button(s), and none of
them know the others exist. All three work with zero configuration: bare
plugins: [...], no options object needed.
Shoji not yet initialized.
Open a photo, then try:
w/s keys. Drag to pan while zoomed in.
The whole integration — three plugins, no options object for any of them:
const gallery = new Shoji('#gallery', {
plugins: [Shoji.Zoom, Shoji.Fullscreen, Shoji.RotateFlip],
});
Each plugin emits its own change event if you want to react to it — e.g. persisting a viewer's preferred zoom level, or just logging it like this page does:
gallery.on('zoomChange', (state) => console.log(state)); // { index, scale }
gallery.on('rotateFlipChange', (state) => console.log(state)); // { index, rotation, flipH, flipV }