Skip to content

Commit

Permalink
Fix: Docs typos
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexIchenskiy committed Jul 15, 2024
1 parent 2570888 commit 0825293
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions docs/styles.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ const orb = new OrbView<MyNode, MyEdge>(container);
orb.data.setDefaultStyle({
getNodeStyle: (node) => {
return {
...node.style,
label: node.data.name,
...node.getStyle(),
label: node.getData().name,
};
},
});
Expand Down Expand Up @@ -223,7 +223,7 @@ orb.data.setDefaultStyle({
color: "#FF0000",
fontSize: 10,
size: 10,
label: `Node: ${node.data.title}`,
label: `Node: ${node.getData().title}`,
};
},
getEdgeStyle() {
Expand Down Expand Up @@ -253,7 +253,7 @@ orb.data.getNodes().forEach((node) => {
color: "#FF0000",
fontSize: 10,
size: 10,
label: `Node: ${node.data.title}`,
label: `Node: ${node.getData().title}`,
});
});
orb.data.getEdges().forEach((edge) => {
Expand Down Expand Up @@ -286,7 +286,7 @@ node.setStyle({
color: "#FF0000",
fontSize: 10,
size: 10,
label: `Node: ${node.data.title}`,
label: `Node: ${node.getData().title}`,
});

// Change the width of all the edges to 1, but keep other style properties
Expand Down
4 changes: 2 additions & 2 deletions docs/view-default.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ access your original properties through `.data` property. There you can find all
your nodes that you assigned in the `orb.data.setup()` function.

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

### Property `render`

Expand Down

0 comments on commit 0825293

Please sign in to comment.