Skip to content

Commit 0825293

Browse files
committed
Fix: Docs typos
1 parent 2570888 commit 0825293

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

docs/styles.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ const orb = new OrbView<MyNode, MyEdge>(container);
9696
orb.data.setDefaultStyle({
9797
getNodeStyle: (node) => {
9898
return {
99-
...node.style,
100-
label: node.data.name,
99+
...node.getStyle(),
100+
label: node.getData().name,
101101
};
102102
},
103103
});
@@ -223,7 +223,7 @@ orb.data.setDefaultStyle({
223223
color: "#FF0000",
224224
fontSize: 10,
225225
size: 10,
226-
label: `Node: ${node.data.title}`,
226+
label: `Node: ${node.getData().title}`,
227227
};
228228
},
229229
getEdgeStyle() {
@@ -253,7 +253,7 @@ orb.data.getNodes().forEach((node) => {
253253
color: "#FF0000",
254254
fontSize: 10,
255255
size: 10,
256-
label: `Node: ${node.data.title}`,
256+
label: `Node: ${node.getData().title}`,
257257
});
258258
});
259259
orb.data.getEdges().forEach((edge) => {
@@ -286,7 +286,7 @@ node.setStyle({
286286
color: "#FF0000",
287287
fontSize: 10,
288288
size: 10,
289-
label: `Node: ${node.data.title}`,
289+
label: `Node: ${node.getData().title}`,
290290
});
291291

292292
// Change the width of all the edges to 1, but keep other style properties

docs/view-default.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,8 @@ access your original properties through `.data` property. There you can find all
263263
your nodes that you assigned in the `orb.data.setup()` function.
264264

265265
Here you can use your original properties to indicate which ones represent your node coordinates
266-
(`node.data.posX`, `node.data.posY`). All you have to do is return a `IPosition` that requires
267-
2 basic properties: `x` and `y` (`{ x: node.data.posX, y: node.data.posY }`).
266+
(`node.getData().posX`, `node.getData().posY`). All you have to do is return a `IPosition` that requires
267+
2 basic properties: `x` and `y` (`{ x: node.getData().posX, y: node.getData().posY }`).
268268

269269
### Property `render`
270270

0 commit comments

Comments
 (0)