Fix missing values and update schedules

This commit is contained in:
barsdeveloper
2022-12-18 10:38:37 +01:00
parent d9216d0d40
commit 42b4cfd47b
16 changed files with 201 additions and 88 deletions

View File

@@ -69,7 +69,9 @@ export default class BlueprintTemplate extends ITemplate {
render() {
return html`
<div class="ueb-viewport-header">
<div class="ueb-viewport-zoom">${this.element.zoom == 0 ? "1:1" : this.element.zoom}</div>
<div class="ueb-viewport-zoom">
Zoom ${this.element.zoom == 0 ? "1:1" : (this.element.zoom > 0 ? "+" : "") + this.element.zoom}
</div>
</div>
<div class="ueb-viewport-overlay"></div>
<div class="ueb-viewport-body">
@@ -100,6 +102,17 @@ export default class BlueprintTemplate extends ITemplate {
this.element.viewportElement.scroll(Configuration.expandGridSize, Configuration.expandGridSize)
}
/** @param {Map} changedProperties */
willUpdate(changedProperties) {
super.willUpdate(changedProperties)
if (this.element.headerElement && changedProperties.has("zoom")) {
this.element.headerElement.classList.add("ueb-zoom-changed")
this.element.headerElement.addEventListener(
"animationend",
() => this.element.headerElement.classList.remove("ueb-zoom-changed")
)
}
}
/** @param {Map} changedProperties */
updated(changedProperties) {