Fix merge conflicts

This commit is contained in:
Ole Eskild Steensen 2023-03-25 16:32:15 +01:00
commit 949e07318a
3 changed files with 9 additions and 5 deletions

View File

@ -77,8 +77,8 @@ function getPermalinkMeta(note, key) {
if (note.data.hide) {
hide = note.data.hide;
}
if (frontMatter.data.pinned) {
pinned = frontMatter.data.pinned;
if (note.data.pinned) {
pinned = note.data.pinned;
}
if (note.data["dg-path"]) {
folders = note.data["dg-path"].split("/");

View File

@ -57,6 +57,7 @@ function getGraph(data) {
neighbors: new Set(),
backLinks: new Set(),
noteIcon: v.data.noteIcon || process.env.NOTE_ICON_DEFAULT,
hide: v.data.hideInGraph || false,
};
stemURLs[fpath] = v.url;
if (

View File

@ -12,7 +12,9 @@
const keys = Object.values(existing).map((n) => n.neighbors).flat();
const n_remaining = Object.keys(remaining).reduce((acc, key) => {
if (keys.indexOf(key) != -1) {
existing[key] = remaining[key];
if (!remaining[key].hide) {
existing[key] = remaining[key];
}
} else {
acc[key] = remaining[key];
}
@ -164,9 +166,10 @@
window.fullGraph = null;
function renderFullGraph() {
if (!window.fullGraph) {
const hiddens = Object.values(window.graphData.nodes).filter((n) => n.hide).map((n) => n.id);
const graphData = {
links: JSON.parse(JSON.stringify(window.graphData.links)),
nodes: [...Object.values(window.graphData.nodes)]
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).filter((n) => !n.hide)]
}
let g = document.createElement('div');