update model (with connections) on change activity Id (#4108)

This commit is contained in:
herblinernexxbizz 2023-06-06 20:21:59 +02:00 committed by GitHub
parent 4b78a4128d
commit b0a142d8f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -208,8 +208,10 @@ export class FlowchartComponent {
nodeShape.activity = activity;
// If the ID of the activity changed, we need to update connection references (X6 stores deep copies of data).
if (activityId !== originalId)
if (activityId !== originalId) {
this.syncEdgeData(originalId, activity);
await this.updateModel();
}
// Update ports.
if (args.updatePorts) {
@ -241,8 +243,10 @@ export class FlowchartComponent {
node.activity = activity;
// If the ID of the activity changed, we need to update connection references (X6 stores deep copies of data).
if (activity.id !== originalId)
if (activity.id !== originalId) {
this.syncEdgeData(originalId, activity);
await this.updateModel();
}
}
@Method()