Add zoom loader as default action

This commit is contained in:
Paulo Gustavo Veiga 2022-01-07 10:16:06 -08:00
parent ecc2ab4e0f
commit 1094881e40

View File

@ -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();
});