@vectoriox/iox-builder 1.4.73 → 1.4.74
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.
|
@@ -1458,10 +1458,21 @@ class InteractionEngineService {
|
|
|
1458
1458
|
const elH = elRect.bottom - elRect.top;
|
|
1459
1459
|
return elH > 0 && overlapH / elH >= 0.1;
|
|
1460
1460
|
};
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1461
|
+
let fired = false;
|
|
1462
|
+
const checkAndFire = () => {
|
|
1463
|
+
if (fired)
|
|
1464
|
+
return;
|
|
1465
|
+
if (isInCanvasViewport()) {
|
|
1466
|
+
fired = true;
|
|
1467
|
+
fire();
|
|
1468
|
+
}
|
|
1469
|
+
};
|
|
1470
|
+
// Initial checks: a single RAF fires before deeply-nested Angular components
|
|
1471
|
+
// have settled their layout. Schedule retries so above-fold elements are
|
|
1472
|
+
// detected even when render takes a few frames.
|
|
1464
1473
|
const rafId = requestAnimationFrame(checkAndFire);
|
|
1474
|
+
const t1 = window.setTimeout(checkAndFire, 100);
|
|
1475
|
+
const t2 = window.setTimeout(checkAndFire, 400);
|
|
1465
1476
|
// Lenis changes scrollTop on .preview-scroll → native scroll event fires.
|
|
1466
1477
|
// Builder also dispatches a synthetic scroll on .preview-lenis-content.
|
|
1467
1478
|
// Listen on both so we catch all scroll notifications.
|
|
@@ -1470,7 +1481,10 @@ class InteractionEngineService {
|
|
|
1470
1481
|
if (lenisEl)
|
|
1471
1482
|
lenisEl.addEventListener('scroll', checkAndFire, { passive: true });
|
|
1472
1483
|
return () => {
|
|
1484
|
+
fired = true; // stop any pending checks
|
|
1473
1485
|
cancelAnimationFrame(rafId);
|
|
1486
|
+
clearTimeout(t1);
|
|
1487
|
+
clearTimeout(t2);
|
|
1474
1488
|
canvasRoot.removeEventListener('scroll', checkAndFire);
|
|
1475
1489
|
if (lenisEl)
|
|
1476
1490
|
lenisEl.removeEventListener('scroll', checkAndFire);
|
|
@@ -1646,7 +1660,11 @@ class InteractionEngineService {
|
|
|
1646
1660
|
// Mark as hidden so the builder overlay and drag engine can ignore this element
|
|
1647
1661
|
// and all of its children regardless of which entrance animation type is used.
|
|
1648
1662
|
element.setAttribute('data-iox-hidden', '');
|
|
1649
|
-
|
|
1663
|
+
// In builder mode the overlay handles all pointer interaction — omit
|
|
1664
|
+
// pointer-events:none so wheel events still reach Lenis and canvas scroll works.
|
|
1665
|
+
if (!this.isBuilderMode()) {
|
|
1666
|
+
element.style.setProperty('pointer-events', 'none');
|
|
1667
|
+
}
|
|
1650
1668
|
this.preStatedElements.add(element);
|
|
1651
1669
|
}
|
|
1652
1670
|
clearInlineAnimationStyles(element) {
|