mirror of
https://github.com/lostpaul/obsidian-folder-notes.git
synced 2026-07-22 07:40:24 +00:00
Remove instead of adding class
This commit is contained in:
parent
dd746ced49
commit
270d7f0f4c
1 changed files with 3 additions and 3 deletions
|
|
@ -288,8 +288,8 @@ export default class FolderNotesPlugin extends Plugin {
|
|||
|
||||
removeCSSClassFromEL(path: string, cssClass: string) {
|
||||
const fileExplorerItem = this.getEL(path);
|
||||
if(!fileExplorerItem) { return }
|
||||
fileExplorerItem.addClass(cssClass)
|
||||
if(!fileExplorerItem) { return; }
|
||||
fileExplorerItem.removeClass(cssClass);
|
||||
}
|
||||
|
||||
getEL(path: string): HTMLElement | null {
|
||||
|
|
@ -297,7 +297,7 @@ export default class FolderNotesPlugin extends Plugin {
|
|||
if(!fileExplorer) { return null; }
|
||||
const fileExplorerItem = fileExplorer.view.fileItems[path];
|
||||
if(!fileExplorerItem) { return null; }
|
||||
if(fileExplorerItem.el) return fileExplorerItem.el
|
||||
if(fileExplorerItem.el) return fileExplorerItem.el;
|
||||
return fileExplorerItem.titleEl;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue