public getValues() {
for(let i: number = 0; i < this.diagram.nodes.length ; i++) {
console.log("Node" + (i+1) + ":" + "OffsetX->" + this.diagram.nodes[i].offsetX);
console.log("Node" + (i+1) + ":" + "offsetY->" + this.diagram.nodes[i].offsetY);
}
} |
Hi Rakhi,We have created a sample to get the node offset values from the hierarchical tree. After the layout gets arranged in the diagram through diagram nodes property you can get the node offset position. In the node’s offsetX and offsetY position we can get where the node gets rendered in the diagram. So by using the node’s offsetX and offsetY position you get the node position and stored in the data base. Please refer below code example and sample below
public getValues() {for(let i: number = 0; i < this.diagram.nodes.length ; i++) {console.log("Node" + (i+1) + ":" + "OffsetX->" + this.diagram.nodes[i].offsetX);console.log("Node" + (i+1) + ":" + "offsetY->" + this.diagram.nodes[i].offsetY);}}RegardsAravind R
public getValues() {
for(let i: number = 0; i < this.diagram.nodes.length ; i++) {
console.log("Node" + (i+1) + ":" + "ID->" + this.diagram.nodes[i].id);
}
} |