Conflict fixes

This commit is contained in:
Nithin David Thomas 2025-03-07 13:59:24 +05:30
parent c16fcc645c
commit 994250f534
2 changed files with 3 additions and 18 deletions

View file

@ -877,24 +877,7 @@ export default function Grid({ gridWidth, currentLayout }) {
} catch (error) {
console.error('Error in onDragEnd:', error);
}
// Hide all sub-canvases after dragging
document.querySelectorAll('.sub-canvas').forEach((element) => {
element.classList.remove('show-grid');
element.classList.add('hide-grid');
});
document.getElementById('real-canvas')?.classList.remove('show-grid');
setCanvasBounds({ ...CANVAS_BOUNDS });
toggleCanvasUpdater();
// Hide all sub-canvases
var canvasElms = document.getElementsByClassName('sub-canvas');
var elementsArray = Array.from(canvasElms);
elementsArray.forEach(function (element) {
element.classList.remove('show-grid');
element.classList.add('hide-grid');
});
document.getElementById('real-canvas')?.classList.remove('show-grid');
hideGridLines();
toggleCanvasUpdater();
}}
@ -920,7 +903,7 @@ export default function Grid({ gridWidth, currentLayout }) {
left = e.translate[0];
top = e.translate[1];
}
// Special case for Modal
const oldParentId = boxList.find((b) => b.id === e.target.id)?.parent;
const parentId = oldParentId?.length > 36 ? oldParentId.slice(0, 36) : oldParentId;
@ -1035,6 +1018,7 @@ export default function Grid({ gridWidth, currentLayout }) {
snapGap={false}
isDisplaySnapDigit={false}
snapThreshold={GRID_HEIGHT}
bounds={canvasBounds}
// Guidelines configuration
elementGuidelines={elementGuidelines}
snapDirections={{

View file

@ -45,6 +45,7 @@ export const Container = ({
border: `1px solid ${borderColor}`,
height,
display: isVisible ? 'flex' : 'none',
flexDirection: 'column',
position: 'relative',
boxShadow,
};