@vectoriox/iox-builder 1.4.50 → 1.4.51

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.
@@ -692,9 +692,8 @@ class DragEngineService {
692
692
  // whose DOM element lives inside the dragged source wrapper.
693
693
  if (this._sourceEl?.contains(el))
694
694
  continue;
695
- // Skip elements hidden by interaction pre-state (pointer-events: none marks
696
- // entrance-type targets that are currently opacity:0 in the canvas).
697
- if (el.style.pointerEvents === 'none')
695
+ // Skip elements hidden by interaction pre-state, and any of their children.
696
+ if (el.closest('[data-iox-hidden]'))
698
697
  continue;
699
698
  const rect = this._dropzoneRectCache.get(id) ?? el.getBoundingClientRect();
700
699
  if (px >= rect.left && px <= rect.right && py >= rect.top && py <= rect.bottom) {
@@ -1451,6 +1450,7 @@ class InteractionEngineService {
1451
1450
  if (this.ENTRANCE_TYPES.has(action.type)) {
1452
1451
  anim.finished.then(() => {
1453
1452
  element.style.removeProperty('pointer-events');
1453
+ element.removeAttribute('data-iox-hidden');
1454
1454
  this.preStatedElements.delete(element);
1455
1455
  // Builder: clear inline pre-state so cancelling animations later
1456
1456
  // doesn't leave the element invisible after a play preview.
@@ -1483,11 +1483,10 @@ class InteractionEngineService {
1483
1483
  for (const [prop, val] of Object.entries(first)) {
1484
1484
  element.style[prop] = String(val);
1485
1485
  }
1486
- // Invisible element must not intercept pointer events.
1487
- const opacity = first['opacity'];
1488
- if (opacity === '0' || opacity === 0) {
1489
- element.style.setProperty('pointer-events', 'none');
1490
- }
1486
+ // Mark as hidden so the builder overlay and drag engine can ignore this element
1487
+ // and all of its children regardless of which entrance animation type is used.
1488
+ element.setAttribute('data-iox-hidden', '');
1489
+ element.style.setProperty('pointer-events', 'none');
1491
1490
  this.preStatedElements.add(element);
1492
1491
  }
1493
1492
  clearInlineAnimationStyles(element) {
@@ -1495,6 +1494,7 @@ class InteractionEngineService {
1495
1494
  element.style.removeProperty('transform');
1496
1495
  element.style.removeProperty('visibility');
1497
1496
  element.style.removeProperty('pointer-events');
1497
+ element.removeAttribute('data-iox-hidden');
1498
1498
  }
1499
1499
  reverseAction(element, action) {
1500
1500
  const { keyframes } = this.buildAnimation(action);