|
@@ -56,6 +56,7 @@ const plugin: JupyterLabPlugin<void> = {
|
|
|
});
|
|
|
const namespace = 'rendered-markdown';
|
|
|
const tracker = new InstanceTracker<MarkdownWidget>({ namespace });
|
|
|
+ let icon = `${PORTRAIT_ICON_CLASS} ${TEXTEDITOR_ICON_CLASS}`;
|
|
|
|
|
|
// Handle state restoration.
|
|
|
restorer.restore(tracker, {
|
|
@@ -64,13 +65,6 @@ const plugin: JupyterLabPlugin<void> = {
|
|
|
name: widget => widget.context.path
|
|
|
});
|
|
|
|
|
|
- let icon = `${PORTRAIT_ICON_CLASS} ${TEXTEDITOR_ICON_CLASS}`;
|
|
|
-
|
|
|
- // Sync tracker with currently focused widget.
|
|
|
- app.shell.currentChanged.connect((sender, args) => {
|
|
|
- tracker.sync(args.newValue);
|
|
|
- });
|
|
|
-
|
|
|
factory.widgetCreated.connect((sender, widget) => {
|
|
|
widget.title.icon = icon;
|
|
|
// Notify the instance tracker if restore data needs to update.
|