mirror of
https://github.com/tcsenpai/obsidiangarden_netlify.git
synced 2025-06-06 20:55:21 +00:00
global graph fix
This commit is contained in:
parent
db6aded023
commit
7a9b3585e1
@ -166,9 +166,10 @@
|
|||||||
window.fullGraph = null;
|
window.fullGraph = null;
|
||||||
function renderFullGraph() {
|
function renderFullGraph() {
|
||||||
if (!window.fullGraph) {
|
if (!window.fullGraph) {
|
||||||
|
const hiddens = Object.values(window.graphData.nodes).filter((n) => n.hide).map((n) => n.id);
|
||||||
const graphData = {
|
const graphData = {
|
||||||
links: JSON.parse(JSON.stringify(window.graphData.links)),
|
links: JSON.parse(JSON.stringify(window.graphData.links)).filter((l) => hiddens.indexOf(l.source) == -1 && hiddens.indexOf(l.target) == -1),
|
||||||
nodes: [...Object.values(window.graphData.nodes)]
|
nodes: [...Object.values(window.graphData.nodes).filter((n) => !n.hide)]
|
||||||
}
|
}
|
||||||
|
|
||||||
let g = document.createElement('div');
|
let g = document.createElement('div');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user