Revert "Merge pull request #1003 from TheUnderScorer/main"

This reverts commit 106f1f0b61, reversing
changes made to 9206e65522.
This commit is contained in:
moklick
2021-03-29 13:26:31 +02:00
parent 106f1f0b61
commit c63992e3ff
10 changed files with 13 additions and 48 deletions
-6
View File
@@ -42,11 +42,6 @@ export const setOnConnectEnd = (onConnectEnd: OnConnectEndFunc) =>
onConnectEnd,
});
export const setDocument = (document: Document | ShadowRoot) =>
createAction(constants.SET_DOCUMENT, {
document
})
export const setElements = (elements: Elements) => createAction(constants.SET_ELEMENTS, elements);
export const updateNodeDimensions = (updates: NodeDimensionUpdate[]) =>
@@ -165,5 +160,4 @@ export type ReactFlowAction = ReturnType<
| typeof setMultiSelectionActive
| typeof setConnectionMode
| typeof setNodeExtent
| typeof setDocument
>;
-1
View File
@@ -31,4 +31,3 @@ export const SET_ELEMENTS_SELECTABLE = 'SET_ELEMENTS_SELECTABLE';
export const SET_MULTI_SELECTION_ACTIVE = 'SET_MULTI_SELECTION_ACTIVE';
export const SET_CONNECTION_MODE = 'SET_CONNECTION_MODE';
export const SET_NODE_EXTENT = 'SET_NODE_EXTENT';
export const SET_DOCUMENT = 'SET_DOCUMENT';
-2
View File
@@ -1,10 +1,8 @@
import configureStore from './configure-store';
import { ReactFlowState, ConnectionMode } from '../types';
import { getInitialDocument } from '../utils/document';
export const initialState: ReactFlowState = {
document: getInitialDocument(),
width: 0,
height: 0,
transform: [0, 0, 1],
-1
View File
@@ -334,7 +334,6 @@ export default function reactFlowReducer(state = initialState, action: ReactFlow
case constants.SET_ELEMENTS_SELECTABLE:
case constants.SET_MULTI_SELECTION_ACTIVE:
case constants.SET_CONNECTION_MODE:
case constants.SET_DOCUMENT:
return { ...state, ...action.payload };
default:
return state;