diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-08-01 20:28:00 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-08-01 20:28:00 +0200 |
commit | 568ca6a042b3246f0d22d3d9d7c504d7e4c73e68 (patch) | |
tree | f427e204c88843d4c01346cff6a4d41d78e032bd /static/components/popup-element.ts | |
parent | Change README to a markdown file. (diff) | |
download | calp-568ca6a042b3246f0d22d3d9d7c504d7e4c73e68.tar.gz calp-568ca6a042b3246f0d22d3d9d7c504d7e4c73e68.tar.xz |
Minor cleanup in TS files.
Diffstat (limited to 'static/components/popup-element.ts')
-rw-r--r-- | static/components/popup-element.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/static/components/popup-element.ts b/static/components/popup-element.ts index 3300f885..458f543c 100644 --- a/static/components/popup-element.ts +++ b/static/components/popup-element.ts @@ -71,10 +71,12 @@ class PopupElement extends ComponentVEvent { return ['visible']; } - attributeChangedCallback(name: string, oldValue?: string, newValue?: string) { + attributeChangedCallback(name: string, _?: string, newValue?: string) { switch (name) { case 'visible': - this.onVisibilityChange() + if (newValue !== null) + /* Only run resize code when showing the popup */ + this.onVisibilityChange() break; } } @@ -92,6 +94,7 @@ class PopupElement extends ComponentVEvent { } private onVisibilityChange() { + console.log('here'); /* TODO better way to find root */ let root; |