@contentful/experiences-visual-editor-react 3.1.1-dev-20250811T1516-ddc6cd6.0 → 3.1.1
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 +6 -2
- package/dist/index.js.map +1 -1
- package/dist/renderApp.js +6 -2
- package/dist/renderApp.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -4820,10 +4820,14 @@ const EmptyCanvasMessage = () => {
|
|
|
4820
4820
|
const sendCanvasGeometryUpdatedMessage = async (tree, sourceEvent) => {
|
|
4821
4821
|
const nodeToCoordinatesMap = {};
|
|
4822
4822
|
collectNodeCoordinates(tree.root, nodeToCoordinatesMap);
|
|
4823
|
+
const rootRect = document.documentElement.getBoundingClientRect();
|
|
4824
|
+
const bodyRect = document.body.getBoundingClientRect();
|
|
4825
|
+
const width = Math.max(document.documentElement.offsetWidth, rootRect.width, bodyRect.width);
|
|
4826
|
+
const height = Math.max(document.documentElement.offsetHeight, rootRect.height, bodyRect.height);
|
|
4823
4827
|
sendMessage(OUTGOING_EVENTS.CanvasGeometryUpdated, {
|
|
4824
4828
|
size: {
|
|
4825
|
-
width
|
|
4826
|
-
height
|
|
4829
|
+
width,
|
|
4830
|
+
height,
|
|
4827
4831
|
},
|
|
4828
4832
|
nodes: nodeToCoordinatesMap,
|
|
4829
4833
|
sourceEvent,
|