Merge pull request #1728 from xixixao/patch-1
Fix bug in updateNodePosDiff action
This commit is contained in:
@@ -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: {
|
||||||
|
|||||||
Reference in New Issue
Block a user