Fixed layout reset while switching layouts

This commit is contained in:
navaneeth 2021-06-03 19:33:07 +05:30
parent 03a71a6352
commit 18e8e172c5

View file

@ -204,17 +204,22 @@ export const Container = ({
width = width + deltaWidth;
height = height + deltaHeight;
setBoxes(
update(boxes, {
[id]: {
$merge: {
layouts: {
[currentLayout]: { width, height, top, left }
}
}
let newBoxes = {
...boxes,
[id]: {
...boxes[id],
layouts: {
...boxes[id]['layouts'],
[currentLayout]: {
...boxes[id]['layouts'][currentLayout],
width, height, top, left
}
}
})
);
}
};
setBoxes(newBoxes);
}
function paramUpdated(id, param, value) {