From 256e602a96dbc8a2c586016606334f590d3f33a0 Mon Sep 17 00:00:00 2001 From: jfh Date: Tue, 20 Oct 2020 00:01:39 +0200 Subject: [PATCH] register the key event with the button --- src/common/utilities.js | 1 + src/editor/components/ToolButton.js | 34 +++++++++++++++++++++++++---- src/editor/svgedit.js | 29 ++++-------------------- 3 files changed, 35 insertions(+), 29 deletions(-) diff --git a/src/common/utilities.js b/src/common/utilities.js index 8ca81297..21681526 100644 --- a/src/common/utilities.js +++ b/src/common/utilities.js @@ -1358,5 +1358,6 @@ export const mock = ({ getRotationAngle = getRotationAngleUser; }; +export const $id = (id) => document.getElementById(id); export const $q = (sel) => document.querySelector(sel); export const $qq = (sel) => [...document.querySelectorAll(sel)]; diff --git a/src/editor/components/ToolButton.js b/src/editor/components/ToolButton.js index e7185495..7bb50bd4 100644 --- a/src/editor/components/ToolButton.js +++ b/src/editor/components/ToolButton.js @@ -1,3 +1,6 @@ +// import {isMac} from '../../common/browser.js'; +// if (isMac() && !window.opera) 'Ctrl+' 'Cmd+' + const template = document.createElement('template'); template.innerHTML = `