File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,36 +27,6 @@ Below is a list of all available methods
2727
2828Adds a node to the canvas.
2929
30- {{< code lang="javascript">}}
31- canvas.addNode({
32- id: "node-1",
33- x: 100,
34- y: 100,
35- element: document.createElement('div'),
36- });
37- {{< /code >}}
38-
39- For convenience, ports can be specified directly during the node creation.
40-
41- {{< code lang="javascript">}}
42- const node = document.createElement('div');
43- const port = document.createElement('div');
44- node.appendChild(port);
45-
46- canvas.addNode({
47- id: "node-1",
48- element: node,
49- ports: [
50- {
51- id: "port-1",
52- element: port,
53- },
54- ] ,
55- });
56- {{< /code >}}
57-
58- All available parameters are demonstrated in the following example:
59-
6030{{< code lang="javascript">}}
6131const node = document.createElement('div');
6232const port = document.createElement('div');
@@ -93,7 +63,7 @@ canvas.addNode({
9363
9464<b >\* Only nodes with defined coordinates are actually displayed on the canvas.
9565When using ` null ` coordinates, make sure to update them later using a <a href =" /layouts/ " >layout algorithm</a >,
96- or an <a href =" /animated-layouts/ " >animated layout algorithm</a >, or < a href = " #update-node " >updateNode</ a > method .</b >
66+ or an <a href =" /animated-layouts/ " >animated layout algorithm</a >.</b >
9767
9868{{< ref-target ref="add-node-port-params">}}
9969
You can’t perform that action at this time.
0 commit comments