Skip to content
This repository has been archived by the owner on Apr 30, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2 from chthollyphile/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
chthollyphile authored Jul 31, 2022
2 parents 4b25b29 + 4bec46b commit 6c70994
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Obsidian-3d-graph-view-plugin
Bringing 3D graph view to Obsidian using [react-force-graph](https://github.com/vasturiano/react-force-graph).
![asf32rq23r2q544213r.png](https://s2.loli.net/2022/07/30/a8o9QbqkNH7plvj.png)
![Obsidian-3d-graph-view-plugin](https://s2.loli.net/2022/07/31/GxaEumRkzS5UbiK.png)

# Warning

Expand Down
1 change: 1 addition & 0 deletions ReactView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ export function Dgraph7c94cd() {
}
return graph
}

12 changes: 4 additions & 8 deletions view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ export class Ob3gvView extends ItemView {

async onOpen() {
const graphJson = Dgraph7c94cd()
// console.log(graphJson) //debug
const root = createRoot(this.containerEl.children[1])
const GROUPS = 12;
root.render(
root.render(
<ForceGraph3D
graphData={graphJson}
nodeColor={() => '#b6bfc1db'}
Expand All @@ -43,14 +41,12 @@ async onOpen() {
sprite.textHeight = 4;
return sprite;
}}
// onNodeClick={handleClick}
/>
)
}

async onClose() {
const root = createRoot(this.containerEl.children[1])
root.render(null)
// ReactDOM.unmountComponentAtNode(this.containerEl.children[1]);
}

ReactDOM.unmountComponentAtNode(this.containerEl);
}
}

0 comments on commit 6c70994

Please sign in to comment.