From 775a4f90da0879a4288246260cf3f65e259d87f0 Mon Sep 17 00:00:00 2001 From: Ross Keenan Date: Fri, 26 Nov 2021 18:15:23 +0200 Subject: [PATCH] feat(Path View): :sparkles: cmd: Toggle Show Trail/Grid in Edit & LP mode (fix #167) --- src/main.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main.ts b/src/main.ts index 9dfdc925..18d77a42 100644 --- a/src/main.ts +++ b/src/main.ts @@ -218,6 +218,16 @@ export default class BCPlugin extends Plugin { callback: async () => await this.refreshIndex(), }); + this.addCommand({ + id: "Toggle-trail-in-Edit&LP", + name: "Toggle: Show Trail/Grid in Edit & LP mode", + callback: async () => { + this.settings.showBCsInEditLPMode = !this.settings.showBCsInEditLPMode; + await this.saveSettings(); + await this.drawTrail(); + }, + }); + this.addCommand({ id: "Write-Breadcrumbs-to-Current-File", name: "Write Breadcrumbs to Current File", @@ -1279,6 +1289,7 @@ export default class BCPlugin extends Plugin { !activeMDView || (mode !== "preview" && !showBCsInEditLPMode) ) { + activeMDView?.containerEl.querySelector(".BC-trail")?.remove(); db.end2G(); return; }