Skip to content
This repository has been archived by the owner on Feb 5, 2021. It is now read-only.

Commit

Permalink
Fix parent validation of nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Minoli authored and nadundesilva committed Dec 20, 2019
1 parent 9942ee3 commit 42bf6a5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/designer/src/components/DesignerView.js
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,7 @@ class DesignerView extends React.Component {
childNodes.forEach((node) => {
const nodeData = this.nodesData.get(node);
nodeData.parent = "";
this.updateNode(node, "", "parent");
});
parentNodes.forEach((item) => {
const bb = this.network.getBoundingBox(item);
Expand Down Expand Up @@ -998,6 +999,7 @@ class DesignerView extends React.Component {
if (node.type === "component" && node.parent === "") {
errorMsgs.push(node.name + " is not placed in a cell or composite");
}

if(node.type === "gateway" && node.parent === ""){
errorMsgs.push(node.name + " is not placed in a cell");
}
Expand All @@ -1013,6 +1015,7 @@ class DesignerView extends React.Component {
networkDataStructure.data.edges.forEach((edge) => {
if (((this.getNodeParentFromId(edge.from) !== this.getNodeParentFromId(edge.to)) && edge.label ===
"")) {

errorMsgs.push("Add Alias for the link from " + this.getNodeFromId(edge.from).label + " to " +
this.getNodeFromId(edge.to).label);
}
Expand Down

0 comments on commit 42bf6a5

Please sign in to comment.