Enables save button when DMN is modified.

This commit is contained in:
Aaron Louie 2020-03-24 14:33:30 -04:00
parent 1b8bc199b8
commit 19931973f0
1 changed files with 5 additions and 1 deletions

View File

@ -202,11 +202,15 @@ export class DiagramComponent implements ControlValueAccessor, AfterViewInit {
this.modeler.on('commandStack.changed', () => this.saveDiagram());
this.modeler.on('views.changed', event => this.saveDiagram());
this.modeler.on('views.changed', () => {
this.modeler.getActiveViewer().get('eventBus').on('commandStack.changed', () => this.saveDiagram());
this.saveDiagram();
});
this.modeler.on('import.done', ({error}) => {
if (!error) {
const activeView = this.modeler.getActiveView();
if (activeView.type === 'drd') {
this.modeler.getActiveViewer().get('canvas').zoom('fit-viewport');
}