From 8de405eb17e5559560afd0730f7dd7fe6f59dd95 Mon Sep 17 00:00:00 2001 From: JFH <20402845+jfhenon@users.noreply.github.com> Date: Thu, 12 Aug 2021 10:02:19 +0200 Subject: [PATCH] Update TopPanel.js --- src/editor/panels/TopPanel.js | 47 ++++++++++++++--------------------- 1 file changed, 18 insertions(+), 29 deletions(-) diff --git a/src/editor/panels/TopPanel.js b/src/editor/panels/TopPanel.js index 942950d8..079213cc 100644 --- a/src/editor/panels/TopPanel.js +++ b/src/editor/panels/TopPanel.js @@ -151,11 +151,6 @@ class TopPanel { * @returns {void} */ updateContextPanel() { - const setInputWidth = (elem) => { - const w = Math.min(Math.max(12 + elem.value.length * 6, 50), 300); - elem.style.width = w + 'px'; - }; - let elem = this.editor.selectedElement; // If element has just been deleted, consider it null if (!isNullish(elem) && !elem.parentNode) { @@ -371,7 +366,6 @@ class TopPanel { const title = this.editor.svgCanvas.getTitle(); const label = $id("g_title"); label.value = title; - setInputWidth(label); $id("g_title").disabled = (tagName === "use"); } } @@ -919,36 +913,31 @@ class TopPanel {