@blorkfield/overlay-core 0.5.2 → 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.cjs CHANGED
@@ -1385,15 +1385,12 @@ var OverlayScene = class {
1385
1385
  /** Check floor segment thresholds and collapse segments that exceed them */
1386
1386
  checkFloorSegmentThresholds() {
1387
1387
  const floorConfig = this.config.floorConfig;
1388
- const legacyThreshold = this.config.floorThreshold;
1389
- if (!floorConfig?.threshold && legacyThreshold === void 0) return;
1388
+ if (!floorConfig?.threshold) return;
1390
1389
  for (let i = 0; i < this.floorSegments.length; i++) {
1391
1390
  if (this.collapsedSegments.has(i)) continue;
1392
1391
  let threshold;
1393
1392
  if (floorConfig?.threshold !== void 0) {
1394
1393
  threshold = Array.isArray(floorConfig.threshold) ? floorConfig.threshold[i] : floorConfig.threshold;
1395
- } else if (legacyThreshold !== void 0) {
1396
- threshold = legacyThreshold;
1397
1394
  }
1398
1395
  if (threshold === void 0) continue;
1399
1396
  const objectIds = this.floorSegmentPressure.get(i);
@@ -1468,12 +1465,9 @@ var OverlayScene = class {
1468
1465
  }
1469
1466
  if (this.floorSegmentPressure.size > 0 || this.collapsedSegments.size > 0) {
1470
1467
  const floorConfig = this.config.floorConfig;
1471
- const legacyThreshold = this.config.floorThreshold;
1472
1468
  let thresholdDisplay = "\u221E";
1473
1469
  if (floorConfig?.threshold !== void 0 && !Array.isArray(floorConfig.threshold)) {
1474
1470
  thresholdDisplay = floorConfig.threshold;
1475
- } else if (legacyThreshold !== void 0) {
1476
- thresholdDisplay = legacyThreshold;
1477
1471
  }
1478
1472
  const segmentParts = [];
1479
1473
  for (let i = 0; i < this.floorSegments.length; i++) {
@@ -1557,10 +1551,16 @@ var OverlayScene = class {
1557
1551
  if (!entry.originalPosition) return;
1558
1552
  const opacity = entry.shadow?.opacity ?? 0.3;
1559
1553
  const shadowId = `shadow-${entry.id}`;
1560
- if (entry.domElement) {
1554
+ if (entry.domElement && entry.originalPosition) {
1561
1555
  const shadowElement = entry.domElement.cloneNode(true);
1562
1556
  shadowElement.style.opacity = String(opacity);
1563
1557
  shadowElement.style.pointerEvents = "none";
1558
+ const width = entry.domElement.offsetWidth;
1559
+ const height = entry.domElement.offsetHeight;
1560
+ shadowElement.style.setProperty("position", "absolute", "important");
1561
+ shadowElement.style.setProperty("left", `${entry.originalPosition.x - width / 2}px`, "important");
1562
+ shadowElement.style.setProperty("top", `${entry.originalPosition.y - height / 2}px`, "important");
1563
+ shadowElement.style.setProperty("transform", "rotate(0deg)", "important");
1564
1564
  entry.domElement.parentNode?.insertBefore(shadowElement, entry.domElement);
1565
1565
  entry.domShadowElement = shadowElement;
1566
1566
  return;
@@ -2773,9 +2773,9 @@ var OverlayScene = class {
2773
2773
  const angleDeg = angle * (180 / Math.PI);
2774
2774
  const width = entry.domElement.offsetWidth;
2775
2775
  const height = entry.domElement.offsetHeight;
2776
- entry.domElement.style.left = `${x - width / 2}px`;
2777
- entry.domElement.style.top = `${y - height / 2}px`;
2778
- entry.domElement.style.transform = `rotate(${angleDeg}deg)`;
2776
+ entry.domElement.style.setProperty("left", `${x - width / 2}px`, "important");
2777
+ entry.domElement.style.setProperty("top", `${y - height / 2}px`, "important");
2778
+ entry.domElement.style.setProperty("transform", `rotate(${angleDeg}deg)`, "important");
2779
2779
  }
2780
2780
  checkTTLExpiration() {
2781
2781
  const now = performance.now();