context menu now offer option to open notes in a new pane

This commit is contained in:
zadam
2021-06-03 12:25:33 +02:00
parent 7ed816f1b2
commit c04bbd4973
7 changed files with 32 additions and 12 deletions

View File

@@ -34,7 +34,7 @@ export default class PaneContainer extends FlexContainer {
this.child(widget);
}
async openNewPaneCommand({ntxId}) {
async openNewPaneEvent({ntxId, notePath}) {
const noteContext = await appContext.tabManager.openEmptyTab(null, 'root', appContext.tabManager.getActiveMainContext().ntxId);
// remove the original position of newly created note context
@@ -52,7 +52,12 @@ export default class PaneContainer extends FlexContainer {
await appContext.tabManager.activateNoteContext(noteContext.ntxId);
await noteContext.setEmpty();
if (notePath) {
await noteContext.setNote(notePath);
}
else {
await noteContext.setEmpty();
}
}
closeThisPaneCommand({ntxId}) {