Skip to content

Commit

Permalink
fix(CreateIndex): 🐛 I had the graphs being closed the wrong way
Browse files Browse the repository at this point in the history
  • Loading branch information
SkepticMystic committed Aug 13, 2021
1 parent a33e248 commit 91f742c
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions src/MatrixView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,8 @@ export default class MatrixView extends ItemView {
const settings = this.plugin.settings;
const currFile = this.app.workspace.getActiveFile().basename;

const allUps = getAllXGs(this.plugin, "up");
const allDowns = getAllXGs(this.plugin, "down");

const upG = mergeGs(...Object.values(allUps));
const downG = mergeGs(...Object.values(allDowns));

const closedParents = closeImpliedLinks(upG, downG);
const { up, down } = this.plugin.currGraphs.mergedGs;
const closedParents = closeImpliedLinks(down, up);

const allPaths = this.dfsAllPaths(closedParents, currFile);
const index = this.createIndex(currFile + "\n", allPaths, settings);
Expand All @@ -71,15 +66,11 @@ export default class MatrixView extends ItemView {
id: "global-index",
name: "Copy a Global Index to the clipboard",
callback: async () => {
const allUps = getAllXGs(this.plugin, "up");
const allDowns = getAllXGs(this.plugin, "down");

const upG = mergeGs(...Object.values(allUps));
const downG = mergeGs(...Object.values(allDowns));
const { up, down } = this.plugin.currGraphs.mergedGs;

const closedParents = closeImpliedLinks(upG, downG);
const closedParents = closeImpliedLinks(down, up);

const terminals = upG.sinks();
const terminals = up.sinks();
const settings = this.plugin.settings;

let globalIndex = "";
Expand Down Expand Up @@ -275,7 +266,7 @@ export default class MatrixView extends ItemView {
await this.plugin.refreshIndex();
});

const data = hierGs.map((hier) => {
const data = hierGs.hierGs.map((hier) => {
const hierData: { [dir in Directions]: Graph } = {
up: undefined,
same: undefined,
Expand Down

0 comments on commit 91f742c

Please sign in to comment.