fix issues

This commit is contained in:
zadam 2020-02-27 12:41:15 +01:00
parent b2a3e1cc04
commit 5e3c85f891
3 changed files with 18 additions and 19 deletions

View File

@ -31,6 +31,7 @@ export default class Layout {
return new FlexContainer('column')
.setParent(appContext)
.id('root-widget')
.css('height', '100vh')
.child(new FlexContainer('row')
.child(new GlobalMenuWidget())
.child(new TabRowWidget())

View File

@ -27,25 +27,25 @@ export default class TabAwareWidget extends BasicWidget {
return this.tabContext && this.tabContext.notePath;
}
tabNoteSwitchedEvent({tabId, notePath}) {
async tabNoteSwitchedEvent({tabId, notePath}) {
// if notePath does not match then the tabContext has been switched to another note in the mean time
if (this.isTab(tabId) && this.notePath === notePath) {
this.noteSwitched();
await this.noteSwitched();
}
}
noteTypeMimeChangedEvent({noteId}) {
async noteTypeMimeChangedEvent({noteId}) {
if (this.noteId === noteId) {
this.refresh();
await this.refresh();
}
}
noteSwitched() {
this.refresh();
async noteSwitched() {
await this.refresh();
}
activeTabChanged() {
this.refresh();
async activeTabChanged() {
await this.refresh();
}
isEnabled() {
@ -70,30 +70,30 @@ export default class TabAwareWidget extends BasicWidget {
}
}
refreshWithNote(note, notePath) {}
async refreshWithNote(note, notePath) {}
activeTabChangedEvent() {
async activeTabChangedEvent() {
this.tabContext = appContext.tabManager.getActiveTabContext();
this.activeTabChanged();
await this.activeTabChanged();
}
// when note is both switched and activated, this should not produce double refresh
tabNoteSwitchedAndActivatedEvent() {
async tabNoteSwitchedAndActivatedEvent() {
this.tabContext = appContext.tabManager.getActiveTabContext();
this.refresh();
await this.refresh();
}
treeCacheReloadedEvent() {
this.refresh();
async treeCacheReloadedEvent() {
await this.refresh();
}
lazyLoadedEvent() {
async lazyLoadedEvent() {
if (!this.tabContext) { // has not been loaded yet
this.tabContext = appContext.tabManager.getActiveTabContext();
}
this.refresh();
await this.refresh();
}
}

View File

@ -32,8 +32,6 @@ export default class RenderTypeWidget extends TypeWidget {
const renderNotesFound = await renderService.render(note, this.$noteDetailRenderContent);
console.trace("render");
if (!renderNotesFound) {
this.$noteDetailRenderHelp.show();
}