// select the connector that has to move
this.diagram.select([this.diagram.connectors[0]]);
// call this method to bring the selected nodes or connectors to front
this.diagram. bringToFront(); |
//Sets the default values of nodes
public getNodeDefaults(obj: NodeModel): NodeModel {
obj.width = 40; obj.height = 40;
//Initialize shape
obj.shape = { type: 'Basic', shape: 'Rectangle', cornerRadius: 7 };
obj.annotations = [
{
//annotation template and an id binded here is an annotation id
template: '<div style="width:40px;height:20px;background-color:white;margin-left:-15px">${id}</div>',
offset: {x:0.5, y:1.1}
}
]
return obj;
} |