🐛 (editor) Fix groups graphPosition round coordinates saving
This commit is contained in:
@ -128,8 +128,8 @@ export const GroupNode = ({ group, groupIndex }: Props) => {
|
||||
}
|
||||
|
||||
moveFocusedGroups({
|
||||
x: Number((delta[0] / graphPosition.scale).toFixed(2)),
|
||||
y: Number((delta[1] / graphPosition.scale).toFixed(2)),
|
||||
x: delta[0] / graphPosition.scale,
|
||||
y: delta[1] / graphPosition.scale,
|
||||
})
|
||||
|
||||
if (last) {
|
||||
|
@ -46,8 +46,12 @@ export const useGroupsStore = createWithEqualityFn<Store>()(
|
||||
(coords, groupId) => ({
|
||||
...coords,
|
||||
[groupId]: {
|
||||
x: groupsCoordinates[groupId].x + delta.x,
|
||||
y: groupsCoordinates[groupId].y + delta.y,
|
||||
x: Number(
|
||||
(groupsCoordinates[groupId].x + delta.x).toFixed(2)
|
||||
),
|
||||
y: Number(
|
||||
(groupsCoordinates[groupId].y + delta.y).toFixed(2)
|
||||
),
|
||||
},
|
||||
}),
|
||||
groupsCoordinates
|
||||
|
Reference in New Issue
Block a user