From 6eafdf47196f166f69ce81a7a232add1a9e1e251 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Wed, 9 Mar 2022 13:01:55 -0800 Subject: [PATCH] Revert zoom removal --- packages/editor/src/classes/menu/Menu.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/packages/editor/src/classes/menu/Menu.ts b/packages/editor/src/classes/menu/Menu.ts index aa821462..21f1a556 100644 --- a/packages/editor/src/classes/menu/Menu.ts +++ b/packages/editor/src/classes/menu/Menu.ts @@ -40,6 +40,8 @@ class Menu extends IMenu { // Create panels ... const designerModel = designer.getModel(); + + // Common actions .... const backTolist = $('#backToList'); backTolist.bind('click', (event) => { event.stopPropagation(); @@ -48,7 +50,22 @@ class Menu extends IMenu { }); Menu._registerTooltip('backToList', $msg('BACK_TO_MAP_LIST')); + this._addButton('zoom-plus', false, false, () => { + designer.zoomIn(); + }); + Menu._registerTooltip('zoom-plus', $msg('ZOOM_IN')); + this._addButton('zoom-minus', false, false, () => { + designer.zoomOut(); + }); + Menu._registerTooltip('zoom-minus', $msg('ZOOM_OUT')); + + this._addButton('position', false, false, () => { + designer.zoomToFit(); + }); + Menu._registerTooltip('position', $msg('CENTER_POSITION')); + + // Edition actions ... if (!readOnly) { const fontFamilyModel = { getValue() {