From d98af1489be1c9a0e73c29aee5af48f4a48e0dd5 Mon Sep 17 00:00:00 2001 From: JFH <20402845+jfhenon@users.noreply.github.com> Date: Sun, 16 May 2021 17:34:54 +0200 Subject: [PATCH] fix opacity with layers --- src/editor/panels/LayersPanel.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/editor/panels/LayersPanel.js b/src/editor/panels/LayersPanel.js index fe315622..bf081ac8 100644 --- a/src/editor/panels/LayersPanel.js +++ b/src/editor/panels/LayersPanel.js @@ -411,14 +411,11 @@ class LayersPanel { self.editor.svgCanvas.setCurrentLayer(evt.currentTarget.textContent); evt.preventDefault(); }); - element.addEventListener('mouseup', function(evt) { - self.toggleHighlightLayer( - self.editor.svgCanvas, - evt.currentTarget.textContent - ); + element.addEventListener('mouseup', (evt) => { + self.toggleHighlightLayer(evt.currentTarget.textContent); }); - element.addEventListener('mouseout', function(_evt) { - self.toggleHighlightLayer(self.editor.svgCanvas); + element.addEventListener('mouseout', (evt) => { + self.toggleHighlightLayer(); }); }); const elements = $id('layerlist').querySelectorAll("td.layervis");