Skip to content
Snippets Groups Projects
Commit d9aa637d authored by Maximilian Giller's avatar Maximilian Giller :squid:
Browse files

Fixes previous commit to find similar types in parsing and fixes missing rename in addNodeType

parent 119b9803
No related branches found
No related tags found
1 merge request!2Implemented editor in the react framework
Pipeline #56802 passed
...@@ -179,7 +179,7 @@ export class Graph extends ManagedData { ...@@ -179,7 +179,7 @@ export class Graph extends ManagedData {
nodeType.color = "#000000"; nodeType.color = "#000000";
} }
this.data.types.push(node); this.data.types.push(nodeType);
this.triggerOnChange(); this.triggerOnChange();
this.storeCurrentData("Added node [" + nodeType + "]"); this.storeCurrentData("Added node [" + nodeType + "]");
...@@ -444,7 +444,7 @@ export class Graph extends ManagedData { ...@@ -444,7 +444,7 @@ export class Graph extends ManagedData {
// TODO: Remove, when types are directly parsed and not just implicit // TODO: Remove, when types are directly parsed and not just implicit
data.nodes.forEach((node) => { data.nodes.forEach((node) => {
const sharedType: NodeType = data.types.find((type) => const sharedType: NodeType = data.types.find((type) =>
type.equals(node.type) type.name === node.type.name || type.equals(node.type)
); );
if (sharedType !== undefined) { if (sharedType !== undefined) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment