Skip to content

Commit

Permalink
New feature:
Browse files Browse the repository at this point in the history
- Linked hierarchies can now be connected to that position.
  • Loading branch information
vrtmrz committed Aug 26, 2023
1 parent 6d9bfc5 commit 2853192
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
13 changes: 10 additions & 3 deletions V2TreeFolderComponent.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@
const dLinks = thisInfo.directLinks;
tagsAll = tagsAll.filter((e) => dLinks.contains(e));
}
if (!isRoot) {
tagsAll = tagsAll.filter((e) => e != "_unlinked");
}
}
const lastTrailTagLC =
Expand Down Expand Up @@ -549,16 +552,20 @@
);
}
const dispName = selfInfo?.displayName ?? tag;
const links = selfInfo?.links ?? [];
const itemCandidates = _setting.linkCombineOtherTree
? $allViewItemsByLink.filter(
(e) => !trail.contains(e.path)
)
: _items;
return [
tag,
dispName,
[dispName],
tag == "_unlinked"
? _items.filter((e) =>
? itemCandidates.filter((e) =>
e.links.contains("_unlinked")
)
: _items.filter((item) =>
: itemCandidates.filter((item) =>
isDirectLinked(selfInfo, item)
),
// .filter((item) => !trail.contains(item.path)),
Expand Down
11 changes: 11 additions & 0 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1336,6 +1336,17 @@ class TagFolderSettingTab extends PluginSettingTab {
await this.plugin.saveSettings();
})
);
new Setting(containerEl)
.setName("Connect linked tree")
.setDesc("")
.addToggle((toggle) =>
toggle
.setValue(this.plugin.settings.linkCombineOtherTree)
.onChange(async (value) => {
this.plugin.settings.linkCombineOtherTree = value;
await this.plugin.saveSettings();
})
);

containerEl.createEl("h3", { text: "Filters" });
new Setting(containerEl)
Expand Down
5 changes: 4 additions & 1 deletion types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ export interface TagFolderSettings {
disableDragging: boolean;
linkConfig: LinkParseConf;
linkShowOnlyFDR: boolean;
linkCombineOtherTree: boolean;

}

export const DEFAULT_SETTINGS: TagFolderSettings = {
Expand Down Expand Up @@ -117,7 +119,8 @@ export const DEFAULT_SETTINGS: TagFolderSettings = {
key: ""
}
},
linkShowOnlyFDR: true
linkShowOnlyFDR: true,
linkCombineOtherTree: true,
};

export const VIEW_TYPE_SCROLL = "tagfolder-view-scroll";
Expand Down

0 comments on commit 2853192

Please sign in to comment.