Merge pull request #1728 from xixixao/patch-1

Fix bug in updateNodePosDiff action
This commit is contained in:
Moritz Klack
2021-12-02 21:35:43 +01:00
committed by GitHub
+1 -1
View File
@@ -137,7 +137,7 @@ export default function reactFlowReducer(state = initialState, action: ReactFlow
const { id, diff, isDragging } = action.payload; const { id, diff, isDragging } = action.payload;
const nextNodes = state.nodes.map((node) => { const nextNodes = state.nodes.map((node) => {
if (id === node.id || state.selectedElements?.find((sNode) => sNode.id === node.id)) { if (id === node.id || (id == null && state.selectedElements?.find((sNode) => sNode.id === node.id))) {
const updatedNode = { const updatedNode = {
...node, ...node,
__rf: { __rf: {