Merge pull request #56 from OptimistikSAS/issues/38

#38 The opacity button does not update with the current element
master
JFH 2021-01-07 13:18:03 +01:00 committed by GitHub
commit f4b3d12cdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -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') : '';