|
public connDefaults(connector: ConnectorModel, diagram: Diagram): void {
connector.type = "Orthogonal";
connector.cornerRadius = 7;
connector.targetDecorator.height = 7;
connector.targetDecorator.width = 7;
let node: NodeModel = diagram.getObject(connector.targetID);
connector.style.strokeColor = node.data["border"];
} |
|
public connDefaults(connector: ConnectorModel, diagram: Diagram): void {
connector.type = "Orthogonal";
connector.cornerRadius = 7;
connector.sourceDecorator = { shape: 'Arrow', height: 7, width: 7};
connector.targetDecorator.height = 7;
connector.targetDecorator.width = 7;
let node: NodeModel = diagram.getObject(connector.targetID);
connector.style.strokeColor = node.data["border"];
} |
|
let desigText: TextElement = new TextElement();
desigText.margin = { left: 0, right: 0, top: 5, bottom: 0 };
desigText.content = "Designation";
desigText.style.color = "black";
desigText.style.strokeColor = "none";
desigText.style.fontSize = 12;
desigText.style.fill = "none";
desigText.horizontalAlignment = "Left";
desigText.style.textWrapping = "Wrap";
desigText.id = obj.id + "_desig";
let desigText2: TextElement = new TextElement();
desigText2.margin = { left: 0, right: 0, top: 5, bottom: 0 };
desigText2.content = "Text 1";
desigText2.style.color = "black";
desigText2.style.strokeColor = "none";
desigText2.style.fontSize = 12;
desigText2.style.fill = "none";
desigText2.horizontalAlignment = "Left";
desigText2.style.textWrapping = "Wrap";
desigText2.id = obj.id + "_desig2";
let desigText3: TextElement = new TextElement();
desigText3.margin = { left: 0, right: 0, top: 5, bottom: 0 };
desigText3.content = "Text 2";
desigText3.style.color = "black";
desigText3.style.strokeColor = "none";
desigText3.style.fontSize = 12;
desigText3.style.fill = "none";
desigText3.horizontalAlignment = "Left";
desigText3.style.textWrapping = "Wrap";
desigText3.id = obj.id + "_desig3";
innerStack.children = [text, division, desigText, desigText2, desigText3];
|
|
let content: StackPanel = new StackPanel();
content.id = obj.id + "_outerstack";
content.orientation = "Horizontal";
content.style.strokeColor = "gray";
content.style.fill = (obj.data as DataInfo).fillColor;
content.padding = { left: 5, right: 10, top: 5, bottom: 5 };
let innerStack: StackPanel = new StackPanel();
innerStack.style.strokeColor = "none";
innerStack.style.fill = (obj.data as DataInfo).fillColor;
innerStack.margin = { left: 5, right: 0, top: 0, bottom: 0 };
innerStack.id = obj.id + "_innerstack"; |