Increased undo history to 50 states, clear history on successful load and save of project
@@ -6,11 +6,20 @@ import editor from "./editorReducer";
import navigation from "./navigationReducer";
import document from "./documentReducer";
import console from "./consoleReducer";
+import { PROJECT_LOAD_SUCCESS, PROJECT_SAVE_SUCCESS } from "../actions/actionTypes";
const rootReducer = combineReducers({
tools,
editor,
- project: undoable(project, { limit: 5, filter: distinctState() }),
+ project: undoable(project, {
+ limit: 50, filter: distinctState(),
+ initTypes: [
+ '@@redux/INIT',
+ '@@INIT',
+ PROJECT_LOAD_SUCCESS,
+ PROJECT_SAVE_SUCCESS
+ ]
+ }),
document,
navigation,
console
