let nodes = [{
id: 'node1',
// Position of the node
offsetX: 100,
offsetY: 100,
// Size of the node
width: 100,
height: 100,
style: {
fill: '#6BA5D7',
strokeColor: 'white'
},
annotations: [{
content: 'Annotation Text',
style: {
textOverflow: 'Ellipsis',
textWrapping: ‘Wrap’
}
}]
}] |
<div style="width: 75%; float: right">
<ejs-diagram
id="diagram"
ref="diagram"
:width="width"
:height="height"
:connectors="connectors"
:nodes="nodes"
:getNodeDefaults='getNodeDefaults'
></ejs-diagram>
</div>
data() {
return {
width: "1000px",
height: "700px",
connectors: connectors,
nodes: nodes,
getNodeDefaults: (node) => {
node.width = 75;
node.height = 75;
node.annotations = [{ style: { textOverflow: 'Ellipsis', textWrapping: 'Wrap' } }];
},
} |