@pageboard/html 0.14.24 → 0.14.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/ui/fieldset-list.js +3 -6
- package/ui/image.js +1 -1
- package/ui/layout.js +3 -1
- package/ui/transition.js +2 -1
package/package.json
CHANGED
package/ui/fieldset-list.js
CHANGED
|
@@ -25,12 +25,6 @@ class HTMLElementFieldsetList extends Page.Element {
|
|
|
25
25
|
this.#resize();
|
|
26
26
|
return vars;
|
|
27
27
|
}
|
|
28
|
-
patch(state) {
|
|
29
|
-
// initialize
|
|
30
|
-
if (this.ownView.children.length == 0) {
|
|
31
|
-
this.#resize();
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
28
|
|
|
35
29
|
reset() {
|
|
36
30
|
this.#list = this.#defaultList?.slice();
|
|
@@ -89,6 +83,9 @@ class HTMLElementFieldsetList extends Page.Element {
|
|
|
89
83
|
for (const node of tpl.content.querySelectorAll('[block-id]')) {
|
|
90
84
|
node.removeAttribute('block-id');
|
|
91
85
|
}
|
|
86
|
+
if (this.ownView.children.length == 0) {
|
|
87
|
+
this.#resize();
|
|
88
|
+
}
|
|
92
89
|
}
|
|
93
90
|
}
|
|
94
91
|
|
package/ui/image.js
CHANGED
|
@@ -157,7 +157,7 @@ const HTMLElementImageConstructor = Superclass => class extends Superclass {
|
|
|
157
157
|
this.classList.remove('loading');
|
|
158
158
|
}
|
|
159
159
|
captureError(e) {
|
|
160
|
-
this.#defer?.reject(
|
|
160
|
+
this.#defer?.reject(new Error(this.currentSrc));
|
|
161
161
|
this.classList.remove('loading');
|
|
162
162
|
this.classList.add('error');
|
|
163
163
|
this.placeholder(true);
|
package/ui/layout.js
CHANGED
|
@@ -60,7 +60,9 @@ class HTMLElementLayout extends Page.create(HTMLDivElement) {
|
|
|
60
60
|
this.#defer = new Deferred();
|
|
61
61
|
const img = new Image();
|
|
62
62
|
img.addEventListener('load', this.#defer.resolve);
|
|
63
|
-
img.addEventListener('error',
|
|
63
|
+
img.addEventListener('error',
|
|
64
|
+
e => this.#defer.reject(new Error(this.currentSrc))
|
|
65
|
+
);
|
|
64
66
|
img.src = curSrc;
|
|
65
67
|
this.style.backgroundImage = `url("${curSrc}")`;
|
|
66
68
|
return this.#defer;
|
package/ui/transition.js
CHANGED