Skip to content

Commit

Permalink
fix: real sibling implies a sibling
Browse files Browse the repository at this point in the history
  • Loading branch information
SkepticMystic committed Jul 6, 2021
1 parent a899d92 commit a9eefb5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/MatrixView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default class MatrixView extends ItemView {
items.forEach((item: string) => {
internalLinkObjArr.push({
to: item,
cls: this.resolvedClass(item, currFile),
cls: this.resolvedClass(item, currFile) + (realQ ? '' : ' breadcrumbs-implied'),
});
});
}
Expand Down Expand Up @@ -142,13 +142,6 @@ export default class MatrixView extends ItemView {
return adjList;
}

// mapToMD(adjList: Map<string, string[]>): string {
// let md = '';

// // Here I need help...

// return md
// }

async draw(): Promise<void> {
this.contentEl.empty();
Expand Down Expand Up @@ -197,7 +190,8 @@ export default class MatrixView extends ItemView {
this.squareItems(gParents, currFile, false),
];

/// Implied Siblings
// SECTION Implied Siblings
/// Notes with the same parents
const currParents = (gParents.successors(currFile.basename) ??
[]) as string[];
const impliedSiblingsArr: internalLinkObj[] = [];
Expand All @@ -221,6 +215,12 @@ export default class MatrixView extends ItemView {
});
}

/// A real sibling implies the reverse sibling
impliedSiblingsArr.push(...this.squareItems(gSiblings, currFile, false))


// !SECTION

this.removeDuplicateImplied(realParents, impliedParents);
this.removeDuplicateImplied(realSiblings, impliedSiblingsArr);
this.removeDuplicateImplied(realChildren, impliedChildren);
Expand Down

0 comments on commit a9eefb5

Please sign in to comment.