Skip to content

Commit

Permalink
Handle LabWidgetManager
Browse files Browse the repository at this point in the history
  • Loading branch information
jtpio committed Aug 22, 2022
1 parent af6d651 commit ed4ab3d
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions python/jupyterlab_widgets/src/output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { JupyterLuminoPanelWidget } from '@jupyter-widgets/base';

import { Panel } from '@lumino/widgets';

import { KernelWidgetManager, WidgetManager } from './manager';
import { LabWidgetManager, WidgetManager } from './manager';

import { OutputAreaModel, OutputArea } from '@jupyterlab/outputarea';

Expand Down Expand Up @@ -63,12 +63,7 @@ export class OutputModel extends outputBase.OutputModel {
* Reset the message id.
*/
reset_msg_id(): void {
let kernel;
if (this.widget_manager instanceof WidgetManager) {
kernel = this.widget_manager.context.sessionContext?.session?.kernel;
} else if (this.widget_manager instanceof KernelWidgetManager) {
kernel = this.widget_manager.kernel;
}
const kernel = this.widget_manager.kernel;
const msgId = this.get('msg_id');
const oldMsgId = this.previous('msg_id');

Expand Down Expand Up @@ -122,7 +117,7 @@ export class OutputModel extends outputBase.OutputModel {
}
}

widget_manager: WidgetManager | KernelWidgetManager;
widget_manager: LabWidgetManager;

private _msgHook: (msg: KernelMessage.IIOPubMessage) => boolean;
private _outputs: OutputAreaModel;
Expand Down

0 comments on commit ed4ab3d

Please sign in to comment.