Skip to content

Commit

Permalink
added link style and directional links
Browse files Browse the repository at this point in the history
  • Loading branch information
zsviczian committed May 5, 2022
1 parent 8909114 commit 2dc5cb6
Show file tree
Hide file tree
Showing 8 changed files with 203 additions and 125 deletions.
10 changes: 6 additions & 4 deletions src/Scene.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { App, FileView, MarkdownView, Notice, TextFileView, TFile, Vault, WorkspaceLeaf } from "obsidian";
import { App, FileView, Notice, TextFileView, TFile, Vault, WorkspaceLeaf } from "obsidian";
import { ExcalidrawAutomate } from "obsidian-excalidraw-plugin/lib/ExcalidrawAutomate";
import { EMPTYBRAIN } from "./constants/emptyBrainFile";
import { Layout } from "./graph/Layout";
Expand All @@ -8,7 +8,7 @@ import ExcaliBrain from "./main";
import { ExcaliBrainSettings } from "./Settings";
import { SearchBox } from "./Suggesters/SearchBox";
import { Neighbour, RelationType, Role } from "./Types";
import { log } from "./utils/utils";


export class Scene {
settings: ExcaliBrainSettings;
Expand All @@ -24,7 +24,7 @@ export class Scene {
public disregardLeafChange: boolean = false;
public terminated: boolean;
private nodesMap: Map<string,Node> = new Map<string,Node>();
private links: Links = new Links();
private links: Links;
private layouts: Layout[] = [];
private removeEH: Function;
private removeTimer: Function;
Expand All @@ -38,6 +38,7 @@ export class Scene {
this.app = plugin.app;
this.leaf = leaf ?? app.workspace.getLeaf(newLeaf);
this.terminated = false;
this.links = new Links(plugin);
}

public async initialize() {
Expand Down Expand Up @@ -231,7 +232,7 @@ export class Scene {
//-------------------------------------------------------
// Generate layout and nodes
this.nodesMap = new Map<string,Node>();
this.links = new Links();
this.links = new Links(this.plugin);
this.layouts = [];
const manyChildren = children.length >10;
const manySiblings = siblings.length > 10;
Expand Down Expand Up @@ -349,6 +350,7 @@ export class Scene {
role,
neighbour.relationType,
neighbour.typeDefinition,
neighbour.linkDirection,
this.ea,
this.settings
)
Expand Down
Loading

0 comments on commit 2dc5cb6

Please sign in to comment.