@vectoriox/iox-builder 1.7.5 → 1.7.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.
@@ -242,11 +242,18 @@ class OverlayService {
242
242
  return this.intersectionRootElement;
243
243
  }
244
244
  /**
245
- * Resolve the inner styled element.
246
- * Builder components apply [ngStyle] on their first child element,
247
- * so computed styles (padding, margin) live there — not on the host.
245
+ * Resolve the styled element (the one carrying `.iox-node-{id}` — where padding/margin/size live).
246
+ * Directive-host components (Image/Heading/Container/Section/…) put `iox-node-{id}` on the HOST
247
+ * itself, so the host IS the styled element. Legacy wrapper components (Card/Repeater/Slider) put
248
+ * it on the first child. Prefer the host when it's the styled element; fall back to the first
249
+ * child otherwise. (Before this, directive-host containers outlined their first child — e.g. a
250
+ * container's outline landed on the image inside it, desyncing from Moveable's resize handles.)
248
251
  */
249
252
  getStyledElement(host) {
253
+ for (let i = 0; i < host.classList.length; i++) {
254
+ if (host.classList[i].startsWith('iox-node-'))
255
+ return host;
256
+ }
250
257
  return host.firstElementChild || host;
251
258
  }
252
259
  // ── Node → Element registry ──────────────────────────────