Hello everyone,
I have a few commands to open diverse panels. For example:
app.shell.add(logConsoleWidget, 'main', { mode: 'split-bottom' });
-
Is there a way to open this panel but with a ratio of 1/3 of the screen instead of half of it with split-bottom?
-
Once this panel opened, is there a way to open a another document in the same panel (meaning as a second tab of the already opened panel) ?
Thanks in advance,
Have a good day,
Thibaut
I’ve found the solution for 2), below is the solution I came up with:
// Iterate over each widget in the 'main' area to find the log console
for (const widget of app.shell.widgets('main')) {
if (widget.id === WIDGET_ID) {
WIDGET_TARGET_PANEL = widget;
break;
}
}
// Then you can open your panel where the WIDGET_TARGET_PANEL is located
app.shell.add(manager.panel, 'main', { ref: WIDGET_TARGET_PANEL.id, mode: 'tab-after' });
app.shell.activateById(manager.panel.id);
Still haven’t found a workaround for 1), it might not be possible.