Skip to content

Commit

Permalink
Add more data to the dummyFields generated to display missing nodes/f…
Browse files Browse the repository at this point in the history
…ields. The extra data allows them to be displayed properly and not cause errors
  • Loading branch information
james-strauss-uwa committed Nov 6, 2024
1 parent 925ea2b commit 16bcc1f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/GraphConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ export class GraphConfigField {
return this;
}

getId = (): string => {
getId = (): FieldId => {
return this.id();
}

Expand Down
8 changes: 5 additions & 3 deletions src/ParameterTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,17 @@ export class ParameterTable {
const lgNode = lg.findNodeByIdQuiet(node.getId());

if (lgNode === null){
displayedFields.push(new Field(null, "<Missing Node:" + node.getId() +">", field.getValue(), "?", field.getComment(), true, Daliuge.DataType.Unknown, false, [], false, Daliuge.FieldType.Unknown, Daliuge.FieldUsage.NoPort));
const dummyField: Field = new Field(field.getId(), "<Missing Node:" + node.getId() +">", field.getValue(), "?", field.getComment(), true, Daliuge.DataType.Unknown, false, [], false, Daliuge.FieldType.Unknown, Daliuge.FieldUsage.NoPort);
dummyField.setNodeId(node.getId());
displayedFields.push(dummyField);
continue;
}

const lgField = lgNode.findFieldById(field.getId());

if (lgField === null){
const dummyField: Field = new Field(null, "<Missing Field: " + field.getId() + ">", field.getValue(), "?", field.getComment(), true, Daliuge.DataType.Unknown, false, [], false, Daliuge.FieldType.Unknown, Daliuge.FieldUsage.NoPort);
dummyField.setNodeId(lgNode.getId());
const dummyField: Field = new Field(field.getId(), "<Missing Field: " + field.getId() + ">", field.getValue(), "?", field.getComment(), true, Daliuge.DataType.Unknown, false, [], false, Daliuge.FieldType.Unknown, Daliuge.FieldUsage.NoPort);
dummyField.setNodeId(node.getId());
displayedFields.push(dummyField);
continue;
}
Expand Down

0 comments on commit 16bcc1f

Please sign in to comment.