Search results

Text API in JavaScript (ES5) Diagram API control

Defines the behavior of the text shape

Properties

content

string

Defines the content of a text

<div id='diagram'></div>
let nodes: NodeModel[] = [{
id: 'node1', width: 100, height: 100, offsetX: 300, offsetY: 100,
shape: { type: 'Text', content: 'Text Element' }
}];
let diagram: Diagram = new Diagram({
...
nodes: nodes
...
});
diagram.appendTo('#diagram');

Defaults to

margin

MarginModel

Defines the space to be let between the node and its immediate parent

Defaults to 0

type

Shapes

Defines the type of node shape

Defaults to ‘Basic’