@blorkfield/overlay-core 0.5.1 → 0.5.3

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/dist/index.js CHANGED
@@ -1341,15 +1341,12 @@ var OverlayScene = class {
1341
1341
  /** Check floor segment thresholds and collapse segments that exceed them */
1342
1342
  checkFloorSegmentThresholds() {
1343
1343
  const floorConfig = this.config.floorConfig;
1344
- const legacyThreshold = this.config.floorThreshold;
1345
- if (!floorConfig?.threshold && legacyThreshold === void 0) return;
1344
+ if (!floorConfig?.threshold) return;
1346
1345
  for (let i = 0; i < this.floorSegments.length; i++) {
1347
1346
  if (this.collapsedSegments.has(i)) continue;
1348
1347
  let threshold;
1349
1348
  if (floorConfig?.threshold !== void 0) {
1350
1349
  threshold = Array.isArray(floorConfig.threshold) ? floorConfig.threshold[i] : floorConfig.threshold;
1351
- } else if (legacyThreshold !== void 0) {
1352
- threshold = legacyThreshold;
1353
1350
  }
1354
1351
  if (threshold === void 0) continue;
1355
1352
  const objectIds = this.floorSegmentPressure.get(i);
@@ -1424,12 +1421,9 @@ var OverlayScene = class {
1424
1421
  }
1425
1422
  if (this.floorSegmentPressure.size > 0 || this.collapsedSegments.size > 0) {
1426
1423
  const floorConfig = this.config.floorConfig;
1427
- const legacyThreshold = this.config.floorThreshold;
1428
1424
  let thresholdDisplay = "\u221E";
1429
1425
  if (floorConfig?.threshold !== void 0 && !Array.isArray(floorConfig.threshold)) {
1430
1426
  thresholdDisplay = floorConfig.threshold;
1431
- } else if (legacyThreshold !== void 0) {
1432
- thresholdDisplay = legacyThreshold;
1433
1427
  }
1434
1428
  const segmentParts = [];
1435
1429
  for (let i = 0; i < this.floorSegments.length; i++) {
@@ -1513,11 +1507,16 @@ var OverlayScene = class {
1513
1507
  if (!entry.originalPosition) return;
1514
1508
  const opacity = entry.shadow?.opacity ?? 0.3;
1515
1509
  const shadowId = `shadow-${entry.id}`;
1516
- if (entry.domElement) {
1510
+ if (entry.domElement && entry.originalPosition) {
1517
1511
  const shadowElement = entry.domElement.cloneNode(true);
1518
1512
  shadowElement.style.opacity = String(opacity);
1519
1513
  shadowElement.style.pointerEvents = "none";
1520
- shadowElement.style.transform = entry.domOriginalTransform || "";
1514
+ const width = entry.domElement.offsetWidth;
1515
+ const height = entry.domElement.offsetHeight;
1516
+ shadowElement.style.setProperty("position", "absolute", "important");
1517
+ shadowElement.style.setProperty("left", `${entry.originalPosition.x - width / 2}px`, "important");
1518
+ shadowElement.style.setProperty("top", `${entry.originalPosition.y - height / 2}px`, "important");
1519
+ shadowElement.style.setProperty("transform", "rotate(0deg)", "important");
1521
1520
  entry.domElement.parentNode?.insertBefore(shadowElement, entry.domElement);
1522
1521
  entry.domShadowElement = shadowElement;
1523
1522
  return;
@@ -2730,9 +2729,9 @@ var OverlayScene = class {
2730
2729
  const angleDeg = angle * (180 / Math.PI);
2731
2730
  const width = entry.domElement.offsetWidth;
2732
2731
  const height = entry.domElement.offsetHeight;
2733
- entry.domElement.style.left = `${x - width / 2}px`;
2734
- entry.domElement.style.top = `${y - height / 2}px`;
2735
- entry.domElement.style.transform = `rotate(${angleDeg}deg)`;
2732
+ entry.domElement.style.setProperty("left", `${x - width / 2}px`, "important");
2733
+ entry.domElement.style.setProperty("top", `${y - height / 2}px`, "important");
2734
+ entry.domElement.style.setProperty("transform", `rotate(${angleDeg}deg)`, "important");
2736
2735
  }
2737
2736
  checkTTLExpiration() {
2738
2737
  const now = performance.now();