@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/renderApp.js
CHANGED
|
@@ -50190,10 +50190,14 @@ const EmptyCanvasMessage = () => {
|
|
|
50190
50190
|
const sendCanvasGeometryUpdatedMessage = async (tree, sourceEvent) => {
|
|
50191
50191
|
const nodeToCoordinatesMap = {};
|
|
50192
50192
|
collectNodeCoordinates(tree.root, nodeToCoordinatesMap);
|
|
50193
|
+
const rootRect = document.documentElement.getBoundingClientRect();
|
|
50194
|
+
const bodyRect = document.body.getBoundingClientRect();
|
|
50195
|
+
const width = Math.max(document.documentElement.offsetWidth, rootRect.width, bodyRect.width);
|
|
50196
|
+
const height = Math.max(document.documentElement.offsetHeight, rootRect.height, bodyRect.height);
|
|
50193
50197
|
sendMessage(OUTGOING_EVENTS.CanvasGeometryUpdated, {
|
|
50194
50198
|
size: {
|
|
50195
|
-
width
|
|
50196
|
-
height
|
|
50199
|
+
width,
|
|
50200
|
+
height,
|
|
50197
50201
|
},
|
|
50198
50202
|
nodes: nodeToCoordinatesMap,
|
|
50199
50203
|
sourceEvent,
|