mirror of
https://github.com/jupyter/notebook.git
synced 2025-04-18 14:10:26 +08:00
Add 'isToggled' check mark on right panel
This commit is contained in:
parent
069685085b
commit
bc67cdc9d1
@ -676,15 +676,31 @@ const sidebarVisibility: JupyterFrontEndPlugin<void> = {
|
||||
}
|
||||
},
|
||||
isToggled: args => {
|
||||
if (notebookShell.leftCollapsed) {
|
||||
return false;
|
||||
}
|
||||
const currentWidget = notebookShell.leftHandler.current;
|
||||
if (!currentWidget) {
|
||||
return false;
|
||||
}
|
||||
var currentWidget = null;
|
||||
switch (args['side'] as string) {
|
||||
case 'left':
|
||||
if (notebookShell.leftCollapsed) {
|
||||
return false;
|
||||
}
|
||||
currentWidget = notebookShell.leftHandler.current;
|
||||
if (!currentWidget) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return currentWidget.id === (args['id'] as string);
|
||||
return currentWidget.id === (args['id'] as string);
|
||||
case 'right':
|
||||
if (notebookShell.rightCollapsed) {
|
||||
return false;
|
||||
}
|
||||
currentWidget = notebookShell.rightHandler.current;
|
||||
if (!currentWidget) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return currentWidget.id === (args['id'] as string);
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user