Skip to content

Commit

Permalink
Fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Ole Eskild Steensen committed Mar 25, 2023
2 parents 083e96e + 1a3e1fa commit 949e073
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/helpers/filetreeUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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("/");
Expand Down
1 change: 1 addition & 0 deletions src/helpers/linkUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
9 changes: 6 additions & 3 deletions src/site/_includes/components/graphScript.njk
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down Expand Up @@ -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');
Expand Down

0 comments on commit 949e073

Please sign in to comment.