mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-05 22:38:48 +00:00
Fixed widgets sticking to cursor (#3143)
This commit is contained in:
parent
8a7a1d21ad
commit
30a4dc9949
1 changed files with 6 additions and 4 deletions
|
|
@ -232,11 +232,13 @@ export const Container = ({
|
|||
|
||||
for (const selectedComponent of selectedComponents) {
|
||||
newBoxes = produce(newBoxes, (draft) => {
|
||||
const topOffset = draft[selectedComponent.id].layouts[currentLayout].top;
|
||||
const leftOffset = draft[selectedComponent.id].layouts[currentLayout].left;
|
||||
if (draft[selectedComponent.id]) {
|
||||
const topOffset = draft[selectedComponent.id].layouts[currentLayout].top;
|
||||
const leftOffset = draft[selectedComponent.id].layouts[currentLayout].left;
|
||||
|
||||
draft[selectedComponent.id].layouts[currentLayout].top = topOffset - topDiff;
|
||||
draft[selectedComponent.id].layouts[currentLayout].left = leftOffset - leftDiff;
|
||||
draft[selectedComponent.id].layouts[currentLayout].top = topOffset - topDiff;
|
||||
draft[selectedComponent.id].layouts[currentLayout].left = leftOffset - leftDiff;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue