@vectoriox/iox-builder 11.9.1 → 11.9.2
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.
|
@@ -2831,6 +2831,8 @@ class OverlayService {
|
|
|
2831
2831
|
this.scrollContainer$ = new Subject();
|
|
2832
2832
|
/** Emits cursor coords when a canvas element is right-clicked. */
|
|
2833
2833
|
this.contextMenu$ = new Subject();
|
|
2834
|
+
/** Something selected moved with no scroll to say so: redraw the boxes in this same frame. */
|
|
2835
|
+
this.reposition$ = new Subject();
|
|
2834
2836
|
/** The From-content row (1-based) a click came from when it selected a TEMPLATE part (CC2), else null. */
|
|
2835
2837
|
this.selectedRow = null;
|
|
2836
2838
|
}
|
|
@@ -2843,6 +2845,9 @@ class OverlayService {
|
|
|
2843
2845
|
getContainer() {
|
|
2844
2846
|
return this.containerElement;
|
|
2845
2847
|
}
|
|
2848
|
+
repositionNow() {
|
|
2849
|
+
this.reposition$.next();
|
|
2850
|
+
}
|
|
2846
2851
|
setScrollContainer(el) {
|
|
2847
2852
|
this.scrollContainerElement = el;
|
|
2848
2853
|
if (el) {
|
|
@@ -7956,6 +7961,8 @@ class OverlayComponent {
|
|
|
7956
7961
|
this.activeScrollContainer = el;
|
|
7957
7962
|
el.addEventListener('scroll', this.boundScrollUpdate, { passive: true });
|
|
7958
7963
|
}));
|
|
7964
|
+
// A Scene's driver moved the selected layer: already inside its frame, so the box lands with it.
|
|
7965
|
+
this.subs.push(this.overlayService.reposition$.subscribe(() => this.updateAll()));
|
|
7959
7966
|
// Open the more menu when a canvas element is right-clicked.
|
|
7960
7967
|
this.subs.push(this.overlayService.contextMenu$.subscribe(({ x, y }) => {
|
|
7961
7968
|
this.moreMenuStyle = { top: `${y}px`, left: `${x}px` };
|
|
@@ -9804,11 +9811,12 @@ class BuilderComponent {
|
|
|
9804
9811
|
// would cause Lenis to re-fire its scroll handler → infinite loop.)
|
|
9805
9812
|
this.overlayService.setScrollContainer(this.lenisContentRef?.nativeElement || null);
|
|
9806
9813
|
// A Scene's layer moves with no scroll to announce it (the damping runs on after the wheel stops, a scrubber or an
|
|
9807
|
-
// edit moves it outright), so the selection box follows the driver's frames
|
|
9814
|
+
// edit moves it outright), so the selection box follows the driver's frames. ⚠️ Told directly, never with a synthetic
|
|
9815
|
+
// 'scroll': the driver listens for scroll in capture on the window, so it would wake itself every frame, for ever.
|
|
9808
9816
|
this.sceneFramesSub = this.sceneCanvas?.frames$.subscribe(() => {
|
|
9809
9817
|
if (!this.overlayService.getCurrentSelection())
|
|
9810
9818
|
return;
|
|
9811
|
-
this.
|
|
9819
|
+
this.overlayService.repositionNow();
|
|
9812
9820
|
this.moveableCanvas.refresh();
|
|
9813
9821
|
});
|
|
9814
9822
|
// .preview-scroll is the Lenis clipping container (overflow:hidden, scrollTop changes).
|