From 08032c40969aca6722e1a9811eb0da2f482c86ef Mon Sep 17 00:00:00 2001 From: Agriya Dev5 Date: Thu, 7 Jan 2021 17:40:40 +0530 Subject: [PATCH] #38 The opacity button does not update with the current element --- src/editor/svgedit.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/editor/svgedit.js b/src/editor/svgedit.js index cd3e980a..abc18a31 100644 --- a/src/editor/svgedit.js +++ b/src/editor/svgedit.js @@ -596,6 +596,8 @@ class Editor extends EditorStartup { // All elements including image and group have opacity if (!isNullish(this.selectedElement)) { + const opacPerc = (this.selectedElement.getAttribute('opacity') || 1.0) * 100; + $id('opacity').value = opacPerc; $id('elem_id').value = this.selectedElement.id; $id('elem_class').value = (this.selectedElement.getAttribute('class') !== null) ? this.selectedElement.getAttribute('class') : '';