refactoring of pane => split, "pane" keeps its old meaning (left-pane, center-pane, right-pane)

This commit is contained in:
zadam
2021-06-03 22:23:11 +02:00
parent ac04be4433
commit 2bfd7b844c
12 changed files with 42 additions and 45 deletions

View File

@@ -133,18 +133,18 @@ function linkContextMenu(e) {
y: e.pageY,
items: [
{title: "Open note in a new tab", command: "openNoteInNewTab", uiIcon: "empty"},
{title: "Open note in a new pane", command: "openNoteInNewPane", uiIcon: "dock-right"},
{title: "Open note in a new split", command: "openNoteInNewSplit", uiIcon: "dock-right"},
{title: "Open note in a new window", command: "openNoteInNewWindow", uiIcon: "window-open"}
],
selectMenuItemHandler: ({command}) => {
if (command === 'openNoteInNewTab') {
appContext.tabManager.openTabWithNoteWithHoisting(notePath);
}
else if (command === 'openNoteInNewPane') {
else if (command === 'openNoteInNewSplit') {
const subContexts = appContext.tabManager.getActiveContext().getSubContexts();
const {ntxId} = subContexts[subContexts.length - 1];
appContext.triggerCommand("openNewPane", {ntxId, notePath});
appContext.triggerCommand("openNewNoteSplit", {ntxId, notePath});
}
else if (command === 'openNoteInNewWindow') {
appContext.triggerCommand('openInWindow', {notePath, hoistedNoteId: 'root'});