Skip to content

Commit ab5f720

Browse files
committed
Inspector support deep data changes
1 parent 2e61ca7 commit ab5f720

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/app/app.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { ChangeDetectorRef, Component, ViewChild, ViewEncapsulation } from '@angular/core';
22
import * as go from 'gojs';
33
import { DataSyncService, DiagramComponent, PaletteComponent } from 'gojs-angular';
4+
import * as _ from 'lodash';
45

56
@Component({
67
selector: 'app-root',
@@ -193,7 +194,7 @@ export class AppComponent {
193194
if (index >= 0) {
194195
// here, we set skipsDiagramUpdate to false, since GoJS does not yet have this update
195196
this.skipsDiagramUpdate = false;
196-
this.diagramNodeData[index] = { key: newNodeData.key, color: newNodeData.color };
197+
this.diagramNodeData[index] = _.cloneDeep(newNodeData);
197198
}
198199
}
199200

0 commit comments

Comments
 (0)