From 537b98f7cbe6ff968ae1b07bb6fcb67ad2fc1273 Mon Sep 17 00:00:00 2001 From: agriyadev5 Date: Fri, 11 Jun 2021 13:23:57 +0530 Subject: [PATCH] #584 attributeChangedCallback changed callback changes --- src/editor/components/seButton.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/editor/components/seButton.js b/src/editor/components/seButton.js index 7715d4fe..52e18f7b 100644 --- a/src/editor/components/seButton.js +++ b/src/editor/components/seButton.js @@ -87,10 +87,10 @@ export class ToolButton extends HTMLElement { this.$img.setAttribute('src', newValue); break; case 'pressed': - if (newValue) { - this.$div.classList.add('pressed'); - } else { + if (newValue === null) { this.$div.classList.remove('pressed'); + } else { + this.$div.classList.add('pressed'); } break; case 'size': @@ -145,7 +145,7 @@ export class ToolButton extends HTMLElement { if (value) { this.setAttribute('pressed', 'true'); } else { - this.removeAttribute('pressed', ''); + this.removeAttribute('pressed'); } } /** @@ -165,7 +165,7 @@ export class ToolButton extends HTMLElement { if (value) { this.setAttribute('disabled', 'true'); } else { - this.removeAttribute('disabled', ''); + this.removeAttribute('disabled'); } } /**