From d50aad1e0d2253ebcf0b21ac190851e092e48ab4 Mon Sep 17 00:00:00 2001 From: JFH <20402845+jfhenon@users.noreply.github.com> Date: Sun, 3 Jan 2021 17:34:46 +0100 Subject: [PATCH] fix exe dropper ext --- .../ext-eyedropper/ext-eyedropper.js | 22 +++++-------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/src/editor/extensions/ext-eyedropper/ext-eyedropper.js b/src/editor/extensions/ext-eyedropper/ext-eyedropper.js index d1f53ad7..4a842ee2 100644 --- a/src/editor/extensions/ext-eyedropper/ext-eyedropper.js +++ b/src/editor/extensions/ext-eyedropper/ext-eyedropper.js @@ -71,29 +71,19 @@ export default { } } - const buttons = [ - { - id: 'tool_eyedropper', - type: 'mode', - events: { - click () { - svgCanvas.setMode('eyedropper'); - } - } + const events = { + id: 'tool_eyedropper', + click () { + svgCanvas.setMode('eyedropper'); } - ]; + }; return { name: strings.name, - newUI: true, - buttons: strings.buttons.map((button, i) => { - return Object.assign(buttons[i], button); - }), - + events, // if we have selected an element, grab its paint and enable the eye dropper button selectedChanged: getStyle, elementChanged: getStyle, - mouseDown (opts) { const mode = svgCanvas.getMode(); if (mode === 'eyedropper') {