refactor(actions): combine batch update and update node dimension actions

This commit is contained in:
moklick
2021-02-11 19:14:30 +01:00
parent 9b70e1e0fa
commit 1d1a17c80a
6 changed files with 6 additions and 41 deletions
+2 -6
View File
@@ -44,11 +44,8 @@ export const setOnConnectEnd = (onConnectEnd: OnConnectEndFunc) =>
export const setElements = (elements: Elements) => createAction(constants.SET_ELEMENTS, elements);
export const batchUpdateNodeDimensions = (updates: NodeDimensionUpdate[]) =>
createAction(constants.BATCH_UPDATE_NODE_DIMENSIONS, updates);
export const updateNodeDimensions = (payload: NodeDimensionUpdate) =>
createAction(constants.UPDATE_NODE_DIMENSIONS, payload);
export const updateNodeDimensions = (updates: NodeDimensionUpdate[]) =>
createAction(constants.UPDATE_NODE_DIMENSIONS, updates);
export const updateNodePos = (payload: NodePosUpdate) => createAction(constants.UPDATE_NODE_POS, payload);
@@ -135,7 +132,6 @@ export type ReactFlowAction = ReturnType<
| typeof setOnConnectStop
| typeof setOnConnectEnd
| typeof setElements
| typeof batchUpdateNodeDimensions
| typeof updateNodeDimensions
| typeof updateNodePos
| typeof updateNodePosDiff