From 4cf4c5090a9136d8ca254aee0d5c40fe9d74c242 Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 11 Mar 2022 14:36:50 -0700 Subject: [PATCH] Remove extra image declaration, now using auto-generated internal image property --- api/js/etemplate/Et2Button/Et2Button.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/api/js/etemplate/Et2Button/Et2Button.ts b/api/js/etemplate/Et2Button/Et2Button.ts index da958b1962..a67a149d24 100644 --- a/api/js/etemplate/Et2Button/Et2Button.ts +++ b/api/js/etemplate/Et2Button/Et2Button.ts @@ -18,7 +18,6 @@ export class Et2Button extends Et2InputWidget(SlotMixin(LionButton)) { protected _created_icon_node : HTMLImageElement; protected clicked : boolean = false; - private _image : string; /** * images to be used as background-image, if none is explicitly applied and id matches given regular expression @@ -110,7 +109,7 @@ export class Et2Button extends Et2InputWidget(SlotMixin(LionButton)) super(); // Property default values - this._image = ''; + this.__image = ''; // Do not add icon here, no children can be added in constructor @@ -128,11 +127,11 @@ export class Et2Button extends Et2InputWidget(SlotMixin(LionButton)) let oldValue = this._image; if(new_image.indexOf("http") >= 0) { - this._image = new_image + this.__image = new_image } else { - this._image = this.egw().image(new_image); + this.__image = this.egw().image(new_image); } this.requestUpdate("image", oldValue); } @@ -211,7 +210,7 @@ export class Et2Button extends Et2InputWidget(SlotMixin(LionButton)) return ''; } - this._iconNode.src = this._image; + this._iconNode.src = this.__image; if(!this.label) { this._iconNode.classList.add('imageOnly');