@blorkfield/overlay-core 0.11.4 → 0.11.6
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/README.md +1 -1
- package/dist/index.cjs +4 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -26,7 +26,7 @@ interface OverlaySceneConfig {
|
|
|
26
26
|
* Useful for responsive canvases and phone rotation (portrait ↔ landscape).
|
|
27
27
|
* Default: false
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
recenterOnResize?: boolean;
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* Configuration for floor segments and pressure thresholds.
|
package/dist/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ interface OverlaySceneConfig {
|
|
|
26
26
|
* Useful for responsive canvases and phone rotation (portrait ↔ landscape).
|
|
27
27
|
* Default: false
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
recenterOnResize?: boolean;
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* Configuration for floor segments and pressure thresholds.
|
package/dist/index.js
CHANGED
|
@@ -2254,7 +2254,7 @@ var OverlayScene = class {
|
|
|
2254
2254
|
}
|
|
2255
2255
|
}
|
|
2256
2256
|
resize(width, height) {
|
|
2257
|
-
if (this.config.
|
|
2257
|
+
if (this.config.recenterOnResize) {
|
|
2258
2258
|
const dx = (width - this.config.bounds.right) / 2;
|
|
2259
2259
|
const dy = (height - this.config.bounds.bottom) / 2;
|
|
2260
2260
|
for (const entry of this.objects.values()) {
|
|
@@ -2266,6 +2266,9 @@ var OverlayScene = class {
|
|
|
2266
2266
|
y: entry.originalPosition.y + dy
|
|
2267
2267
|
};
|
|
2268
2268
|
}
|
|
2269
|
+
if (entry.domElement && entry.tags.includes("static")) {
|
|
2270
|
+
this.updateDOMElementTransform(entry);
|
|
2271
|
+
}
|
|
2269
2272
|
if (entry.domShadowElement) {
|
|
2270
2273
|
const currentLeft = parseFloat(entry.domShadowElement.style.left) || 0;
|
|
2271
2274
|
const currentTop = parseFloat(entry.domShadowElement.style.top) || 0;
|