motion-dom 12.27.4 → 12.27.5
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.
|
@@ -4,8 +4,8 @@ import { createProjectionNode } from './create-projection-node.mjs';
|
|
|
4
4
|
const DocumentProjectionNode = createProjectionNode({
|
|
5
5
|
attachResizeListener: (ref, notify) => addDomEvent(ref, "resize", notify),
|
|
6
6
|
measureScroll: () => ({
|
|
7
|
-
x: document.documentElement.scrollLeft || document.body
|
|
8
|
-
y: document.documentElement.scrollTop || document.body
|
|
7
|
+
x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0,
|
|
8
|
+
y: document.documentElement.scrollTop || document.body?.scrollTop || 0,
|
|
9
9
|
}),
|
|
10
10
|
checkIsScrollRoot: () => true,
|
|
11
11
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentProjectionNode.mjs","sources":["../../../../src/projection/node/DocumentProjectionNode.ts"],"sourcesContent":["import { addDomEvent } from \"../../events/add-dom-event\"\nimport { createProjectionNode } from \"./create-projection-node\"\n\nexport const DocumentProjectionNode = createProjectionNode<Window>({\n attachResizeListener: (\n ref: Window | Element,\n notify: VoidFunction\n ): VoidFunction => addDomEvent(ref, \"resize\", notify),\n measureScroll: () => ({\n x: document.documentElement.scrollLeft || document.body
|
|
1
|
+
{"version":3,"file":"DocumentProjectionNode.mjs","sources":["../../../../src/projection/node/DocumentProjectionNode.ts"],"sourcesContent":["import { addDomEvent } from \"../../events/add-dom-event\"\nimport { createProjectionNode } from \"./create-projection-node\"\n\nexport const DocumentProjectionNode = createProjectionNode<Window>({\n attachResizeListener: (\n ref: Window | Element,\n notify: VoidFunction\n ): VoidFunction => addDomEvent(ref, \"resize\", notify),\n measureScroll: () => ({\n x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0,\n y: document.documentElement.scrollTop || document.body?.scrollTop || 0,\n }),\n checkIsScrollRoot: () => true,\n})\n"],"names":[],"mappings":";;;AAGO,MAAM,sBAAsB,GAAG,oBAAoB,CAAS;AAC/D,IAAA,oBAAoB,EAAE,CAClB,GAAqB,EACrB,MAAoB,KACL,WAAW,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,CAAC;AACrD,IAAA,aAAa,EAAE,OAAO;AAClB,QAAA,CAAC,EAAE,QAAQ,CAAC,eAAe,CAAC,UAAU,IAAI,QAAQ,CAAC,IAAI,EAAE,UAAU,IAAI,CAAC;AACxE,QAAA,CAAC,EAAE,QAAQ,CAAC,eAAe,CAAC,SAAS,IAAI,QAAQ,CAAC,IAAI,EAAE,SAAS,IAAI,CAAC;KACzE,CAAC;AACF,IAAA,iBAAiB,EAAE,MAAM,IAAI;AAChC,CAAA;;;;"}
|
package/dist/motion-dom.dev.js
CHANGED
|
@@ -8944,8 +8944,8 @@
|
|
|
8944
8944
|
const DocumentProjectionNode = createProjectionNode$1({
|
|
8945
8945
|
attachResizeListener: (ref, notify) => addDomEvent(ref, "resize", notify),
|
|
8946
8946
|
measureScroll: () => ({
|
|
8947
|
-
x: document.documentElement.scrollLeft || document.body
|
|
8948
|
-
y: document.documentElement.scrollTop || document.body
|
|
8947
|
+
x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0,
|
|
8948
|
+
y: document.documentElement.scrollTop || document.body?.scrollTop || 0,
|
|
8949
8949
|
}),
|
|
8950
8950
|
checkIsScrollRoot: () => true,
|
|
8951
8951
|
});
|