Skip to content

Commit 74c57ac

Browse files
committed
Revert unwanted changes
1 parent 3663430 commit 74c57ac

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/index.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { ICommandPalette, WidgetTracker } from '@jupyterlab/apputils';
22

33
import {
44
ILabShell,
5+
ILayoutRestorer,
56
JupyterFrontEnd,
67
JupyterFrontEndPlugin
78
} from '@jupyterlab/application';
@@ -34,12 +35,13 @@ namespace CommandIDs {
3435
*/
3536
const variableinspector: JupyterFrontEndPlugin<IVariableInspectorManager> = {
3637
id: '@lckr/jupyterlab_variableinspector',
37-
requires: [ICommandPalette, ILabShell],
38+
requires: [ICommandPalette, ILayoutRestorer, ILabShell],
3839
provides: IVariableInspectorManager,
3940
autoStart: true,
4041
activate: (
4142
app: JupyterFrontEnd,
4243
palette: ICommandPalette,
44+
restorer: ILayoutRestorer,
4345
labShell: ILabShell
4446
): IVariableInspectorManager => {
4547
const manager = new VariableInspectorManager();
@@ -71,6 +73,13 @@ const variableinspector: JupyterFrontEndPlugin<IVariableInspectorManager> = {
7173
return panel;
7274
}
7375

76+
// Enable state restoration
77+
restorer.restore(tracker, {
78+
command,
79+
args: () => ({}),
80+
name: () => 'variableinspector'
81+
});
82+
7483
// Add command to palette
7584
app.commands.addCommand(command, {
7685
label,

0 commit comments

Comments
 (0)