File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
projects/gojs-angular/src/lib Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 1010# dependencies
1111/node_modules
1212/src /app
13+ /src
1314
1415# profiling files
1516chrome-profiler-events.json
Original file line number Diff line number Diff line change @@ -76,11 +76,11 @@ export class NgDiagramHelper{
7676 if ( component . hasOwnProperty ( "diagram" ) ) diagram = component [ "diagram" ] ;
7777 if ( component . hasOwnProperty ( "palette" ) ) diagram = component [ "palette" ] ;
7878 component . modelChangedListener = ( e : go . ChangedEvent ) => {
79- if ( e . isTransactionFinished && diagram && diagram . model && ! diagram . model . isReadOnly ) {
79+ if ( e . isTransactionFinished && e . model && ! e . model . isReadOnly && component . modelChange ) {
8080 // this must be done within a NgZone.run block, so changes are detected in the parent component
8181 component . zone . run ( ( ) => {
8282 const dataChanges = e . model ! . toIncrementalData ( e ) ;
83- component . modelChange . emit ( dataChanges ) ;
83+ if ( dataChanges !== null ) component . modelChange . emit ( dataChanges ) ;
8484 } ) ;
8585 }
8686 } ;
You can’t perform that action at this time.
0 commit comments