@@ -11,8 +11,7 @@ import { fromJS, Map } from "immutable";
11
11
import { debounce , isEqual } from "lodash" ;
12
12
import { from_json , to_json , merge_copy , uuid } from "@cocalc/util/misc" ;
13
13
import { JupyterActions as JupyterActions0 } from "@cocalc/jupyter/redux/actions" ;
14
- import { WidgetManager } from "./widgets/manager" ;
15
- import { WidgetManager as WidgetManager2 } from "./widgets/manager2" ;
14
+ import { WidgetManager } from "./widgets/manager2" ;
16
15
import { CursorManager } from "./cursor-manager" ;
17
16
import { ConfirmDialogOptions } from "./confirm-dialog" ;
18
17
import { callback2 , once } from "@cocalc/util/async-utils" ;
@@ -39,7 +38,6 @@ import { webapp_client } from "@cocalc/frontend/webapp-client";
39
38
40
39
export class JupyterActions extends JupyterActions0 {
41
40
public widget_manager ?: WidgetManager ;
42
- public widget_manager2 ?: WidgetManager2 ;
43
41
public nbgrader_actions : NBGraderActions ;
44
42
public snippet_actions : any ;
45
43
@@ -109,17 +107,10 @@ export class JupyterActions extends JupyterActions0 {
109
107
if ( ipywidgets_state == null ) {
110
108
throw Error ( "bug -- ipywidgets_state must be defined" ) ;
111
109
}
112
- if ( false ) {
113
- this . widget_manager = new WidgetManager (
114
- ipywidgets_state ! ,
115
- this . setWidgetModelIdState . bind ( this ) ,
116
- ) ;
117
- } else {
118
- this . widget_manager2 = new WidgetManager2 ( {
119
- ipywidgets_state : ipywidgets_state ! ,
120
- actions : this ,
121
- } ) ;
122
- }
110
+ this . widget_manager = new WidgetManager ( {
111
+ ipywidgets_state : ipywidgets_state ! ,
112
+ actions : this ,
113
+ } ) ;
123
114
// Stupid hack for now -- this just causes some activity so
124
115
// that the syncdb syncs.
125
116
// This should not be necessary, and may indicate a bug in the sync layer?
@@ -323,20 +314,6 @@ export class JupyterActions extends JupyterActions0 {
323
314
// this.deprecated("focus_unlock");
324
315
} ;
325
316
326
- private setWidgetModelIdState (
327
- model_id : string ,
328
- state : string | null , // '' = good; 'nonempty' = bad; null=delete
329
- ) : void {
330
- let widgetModelIdState : Map < string , string > =
331
- this . store . get ( "widgetModelIdState" ) ;
332
- if ( state === null ) {
333
- widgetModelIdState = widgetModelIdState . delete ( model_id ) ;
334
- } else {
335
- widgetModelIdState = widgetModelIdState . set ( model_id , state ) ;
336
- }
337
- this . setState ( { widgetModelIdState } ) ;
338
- }
339
-
340
317
protected close_client_only ( ) : void {
341
318
const account = this . redux . getStore ( "account" ) ;
342
319
if ( account != null ) {
0 commit comments