Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

psyneu-74 changes to serialization required #61

Merged
merged 1 commit into from
Jul 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/react-diagrams/MetaLinkModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ export class MetaLinkModel extends DefaultLinkModel {
return {
...super.serialize(),
...additionalParams,
sourcePort: this.getSourcePort()?.serialize(),
targetPort: this.getTargetPort()?.serialize(),
};
}
}
6 changes: 6 additions & 0 deletions src/react-diagrams/MetaNodeModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
createLinkModel(): MetaLinkModel {
return new MetaLinkModel();
}

serialise(): any {
return {
...super.serialize(),
};
}
}

export class MetaNodeModel extends NodeModel {
Expand Down Expand Up @@ -71,7 +77,7 @@
return this.getOptions()[label];
}

setLoggable(loggable: string, value: any, triggerUpdate?: boolean | undefined) {

Check failure on line 80 in src/react-diagrams/MetaNodeModel.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node 14.x and ubuntu-latest

Replace `loggable:·string,·value:·any,·triggerUpdate?:·boolean·|·undefined` with `⏎····loggable:·string,⏎····value:·any,⏎····triggerUpdate?:·boolean·|·undefined⏎··`
// TODO: we need to move this away from meta-diagram but I don't really have time to think about this atm
// @ts-ignore
this.options['Loggables'][loggable] = value;
Expand Down Expand Up @@ -116,11 +122,11 @@
});
return {
...super.serialize(),
'name': this.getOption('name'),

Check failure on line 125 in src/react-diagrams/MetaNodeModel.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node 14.x and ubuntu-latest

Replace `'name'` with `name`
'graphPath': this.getOption('graphPath'),

Check failure on line 126 in src/react-diagrams/MetaNodeModel.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node 14.x and ubuntu-latest

Replace `'graphPath'` with `graphPath`
'class_inputs': {

Check failure on line 127 in src/react-diagrams/MetaNodeModel.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node 14.x and ubuntu-latest

Replace `'class_inputs'` with `class_inputs`
...additionalParams,
}

Check failure on line 129 in src/react-diagrams/MetaNodeModel.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node 14.x and ubuntu-latest

Insert `,`
};
}
}
Loading