Skip to content

Commit 636869e

Browse files
COLLONVAL Fredericfcollonval
authored andcommitted
ENH allow to specify tab insertion mode - default split-right
1 parent f754bf3 commit 636869e

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

sidecar/sidecar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ class Sidecar(Output):
2323
_view_module = Unicode(module_name).tag(sync=True)
2424
_view_module_version = Unicode(EXTENSION_SPEC_VERSION).tag(sync=True)
2525
title = Unicode('Sidecar').tag(sync=True)
26-
anchor = CaselessStrEnum(['main', 'right'], default_value='main', allow_none=False).tag(sync=True)
26+
anchor = CaselessStrEnum(['split-right', 'split-left', 'split-top', 'split-bottom', 'tab-before', 'tab-after', 'right'], default_value='split-right', allow_none=False).tag(sync=True)

src/plugin.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ function activateWidgetExtension(app: JupyterLab, registry: IJupyterWidgetRegist
7777
// app.shell.add(w, 'left');
7878
// app.shell.expandLeft();
7979
} else {
80-
app.shell.addToMainArea(w);
81-
w.activate()
80+
app.shell.addToMainArea(w, {mode: anchor});
8281
}
8382
}
8483
}

src/widget.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class SidecarModel extends OutputModel {
2424
_view_module: SidecarModel.view_module,
2525
_view_module_version: SidecarModel.view_module_version,
2626
title: 'Sidecar',
27-
anchor: 'main'
27+
anchor: 'split-right'
2828
};
2929
}
3030

0 commit comments

Comments
 (0)