[editor] Add undo function
Only works for a few commands (mainly page and section stuff). - Adds new menu to page-bar, which shows issued change commands with a button to rollback the latest change. - Added warning to the UI element that this is a experimental feature and can destroy units. - Undo is done by having the normal function to apply the change to the unit-object and another to undo this change. The HistoryService manages the list and calling rollack (via UnitService). - Further refactiring to the unit services.
Showing
- projects/common/models/page.ts 12 additions, 0 deletionsprojects/common/models/page.ts
- projects/common/models/unit.ts 0 additions, 19 deletionsprojects/common/models/unit.ts
- projects/editor/src/app/components/properties-panel/element-properties-panel.component.ts 1 addition, 1 deletion...ts/properties-panel/element-properties-panel.component.ts
- projects/editor/src/app/components/unit-view/page-menu.component.ts 1 addition, 1 deletion...ditor/src/app/components/unit-view/page-menu.component.ts
- projects/editor/src/app/components/unit-view/unit-view.component.css 10 additions, 0 deletions...itor/src/app/components/unit-view/unit-view.component.css
- projects/editor/src/app/components/unit-view/unit-view.component.html 18 additions, 0 deletions...tor/src/app/components/unit-view/unit-view.component.html
- projects/editor/src/app/services/history.service.ts 29 additions, 0 deletionsprojects/editor/src/app/services/history.service.ts
- projects/editor/src/app/services/unit-services/element.service.ts 16 additions, 9 deletions.../editor/src/app/services/unit-services/element.service.ts
- projects/editor/src/app/services/unit-services/page.service.ts 24 additions, 13 deletions...cts/editor/src/app/services/unit-services/page.service.ts
- projects/editor/src/app/services/unit-services/section.service.ts 70 additions, 48 deletions.../editor/src/app/services/unit-services/section.service.ts
- projects/editor/src/app/services/unit-services/unit.service.ts 17 additions, 0 deletions...cts/editor/src/app/services/unit-services/unit.service.ts
Loading
Please register or sign in to comment