|
|
@@ -21,7 +21,7 @@
|
|
|
* Source.
|
|
|
*/
|
|
|
|
|
|
-/* global window */
|
|
|
+/* global window, Event */
|
|
|
|
|
|
(() => {
|
|
|
|
|
|
@@ -148,7 +148,7 @@
|
|
|
document.documentElement.style.setProperty("transform-origin", (zoomFactorX < 1 ? "50%" : "0") + " " + (zoomFactorY < 1 ? "50%" : "0") + " 0", "important");
|
|
|
document.documentElement.style.setProperty("transform", "scale3d(" + zoomFactor + ", " + zoomFactor + ", 1)", "important");
|
|
|
dispatchEvent.call(window, new UIEvent("resize"));
|
|
|
- dispatchEvent.call(window, new UIEvent("scroll"));
|
|
|
+ dispatchEvent.call(window, new Event("scroll"));
|
|
|
if (keepZoomLevel) {
|
|
|
document.documentElement.style.setProperty("-sf-transform", transform, transformPriority);
|
|
|
document.documentElement.style.setProperty("-sf-transform-origin", transformOrigin, transformOriginPriority);
|
|
|
@@ -159,7 +159,7 @@
|
|
|
}
|
|
|
if (!keepZoomLevel) {
|
|
|
dispatchEvent.call(window, new UIEvent("resize"));
|
|
|
- dispatchEvent.call(window, new UIEvent("scroll"));
|
|
|
+ dispatchEvent.call(window, new Event("scroll"));
|
|
|
const docBoundingRect = scrollingElement.getBoundingClientRect();
|
|
|
[...observers].forEach(([intersectionObserver, observer]) => {
|
|
|
const rootBoundingRect = observer.options && observer.options.root && observer.options.root.getBoundingClientRect();
|
|
|
@@ -218,7 +218,7 @@
|
|
|
}
|
|
|
if (!keepZoomLevel) {
|
|
|
dispatchEvent.call(window, new UIEvent("resize"));
|
|
|
- dispatchEvent.call(window, new UIEvent("scroll"));
|
|
|
+ dispatchEvent.call(window, new Event("scroll"));
|
|
|
}
|
|
|
}
|
|
|
|