diff --git a/packages/mindplot/src/indexLoader.js b/packages/mindplot/src/indexLoader.js index 76d2f7d3..7bb84bf5 100644 --- a/packages/mindplot/src/indexLoader.js +++ b/packages/mindplot/src/indexLoader.js @@ -62,6 +62,22 @@ const options = buildOptions({ // Build designer ... const designer = buildDesigner(options); +// Hock zoom events ... +const zoomInButton = document.getElementById('zoom-plus'); +const zoomOutButton = document.getElementById('zoom-minus'); + +if (zoomInButton) { + zoomInButton.addEventListener('click', () => { + designer.zoomIn(); + }); +} +if (zoomOutButton) { + zoomOutButton.addEventListener('click', () => { + designer.zoomOut(); + }); +} + + designer.addEvent('loadSuccess', () => { loadingModal.hide(); });