@pageboard/html 0.15.13 → 0.15.14

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pageboard/html",
3
- "version": "0.15.13",
3
+ "version": "0.15.14",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "repository": {
package/ui/image.css CHANGED
@@ -8,6 +8,10 @@ element-image {
8
8
  min-height: auto;
9
9
  }
10
10
 
11
+ element-image.no-size::after {
12
+ content: "⤡" !important;
13
+ }
14
+
11
15
  element-image > [block-content="legend"] {
12
16
  position:absolute;
13
17
  font-size:0.8rem;
package/ui/image.js CHANGED
@@ -110,13 +110,13 @@ const HTMLElementImageConstructor = Superclass => class extends Superclass {
110
110
  r.width = w;
111
111
  r.height = h;
112
112
  } else {
113
- const rect = this.getBoundingClientRect();
114
- r.width = rect.width;
115
- r.height = rect.height;
113
+ const { clientWidth, clientHeight } = this.offsetParent ?? {};
114
+ r.width = clientWidth;
115
+ r.height = clientHeight;
116
116
  }
117
117
  }
118
- if (!r.width && !r.height) {
119
- // don't show
118
+ if (this.classList.toggle("no-size", !r.width && !r.height)) {
119
+ // Image container must have dimensions
120
120
  return;
121
121
  }
122
122
  if (crop.x != 50 || crop.y != 50 || crop.w != 100 || crop.h != 100) {
package/ui/loading.css CHANGED
@@ -12,7 +12,7 @@
12
12
  position:absolute;
13
13
  width: 100%;
14
14
  top: 50%;
15
- margin-top: -0.5rem;
15
+ margin-top: -0.2rem;
16
16
  line-height: 1rem;
17
17
  }
18
18