@yoamigo.com/core 0.4.5 → 0.4.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.
- package/dist/index.js +8 -1
- package/dist/lib.js +8 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -226,7 +226,7 @@ var BuilderSelectionManager = class {
|
|
|
226
226
|
}
|
|
227
227
|
break;
|
|
228
228
|
case "GET_SCROLL_POSITION":
|
|
229
|
-
this.sendToParent({ type: "SCROLL_POSITION", scrollY: window.scrollY });
|
|
229
|
+
this.sendToParent({ type: "SCROLL_POSITION", scrollX: window.scrollX, scrollY: window.scrollY });
|
|
230
230
|
break;
|
|
231
231
|
case "GET_ALL_ROUTES":
|
|
232
232
|
this.sendToParent({ type: "ALL_ROUTES", routes: this.getAllRoutes() });
|
|
@@ -516,6 +516,13 @@ var BuilderSelectionManager = class {
|
|
|
516
516
|
setupScrollResizeListeners() {
|
|
517
517
|
window.addEventListener("scroll", this.updateSelectionPositions, { passive: true });
|
|
518
518
|
window.addEventListener("resize", this.updateSelectionPositions, { passive: true });
|
|
519
|
+
window.addEventListener(
|
|
520
|
+
"scroll",
|
|
521
|
+
() => {
|
|
522
|
+
this.sendToParent({ type: "SCROLL_POSITION", scrollX: window.scrollX, scrollY: window.scrollY });
|
|
523
|
+
},
|
|
524
|
+
{ passive: true }
|
|
525
|
+
);
|
|
519
526
|
}
|
|
520
527
|
setupKeyboardListener() {
|
|
521
528
|
document.addEventListener("keydown", this.handleKeyDown);
|
package/dist/lib.js
CHANGED
|
@@ -185,7 +185,7 @@ var BuilderSelectionManager = class {
|
|
|
185
185
|
}
|
|
186
186
|
break;
|
|
187
187
|
case "GET_SCROLL_POSITION":
|
|
188
|
-
this.sendToParent({ type: "SCROLL_POSITION", scrollY: window.scrollY });
|
|
188
|
+
this.sendToParent({ type: "SCROLL_POSITION", scrollX: window.scrollX, scrollY: window.scrollY });
|
|
189
189
|
break;
|
|
190
190
|
case "GET_ALL_ROUTES":
|
|
191
191
|
this.sendToParent({ type: "ALL_ROUTES", routes: this.getAllRoutes() });
|
|
@@ -475,6 +475,13 @@ var BuilderSelectionManager = class {
|
|
|
475
475
|
setupScrollResizeListeners() {
|
|
476
476
|
window.addEventListener("scroll", this.updateSelectionPositions, { passive: true });
|
|
477
477
|
window.addEventListener("resize", this.updateSelectionPositions, { passive: true });
|
|
478
|
+
window.addEventListener(
|
|
479
|
+
"scroll",
|
|
480
|
+
() => {
|
|
481
|
+
this.sendToParent({ type: "SCROLL_POSITION", scrollX: window.scrollX, scrollY: window.scrollY });
|
|
482
|
+
},
|
|
483
|
+
{ passive: true }
|
|
484
|
+
);
|
|
478
485
|
}
|
|
479
486
|
setupKeyboardListener() {
|
|
480
487
|
document.addEventListener("keydown", this.handleKeyDown);
|