@@ -3,7 +3,7 @@ var WidgetManager = require('./manager').WidgetManager;
3
3
4
4
require ( '@jupyter-widgets/controls/css/widgets.css' ) ;
5
5
6
- document . addEventListener ( 'DOMContentLoaded' , function ( event ) {
6
+ document . addEventListener ( 'DOMContentLoaded' , function ( event ) {
7
7
var manager = new WidgetManager ( document . body ) ;
8
8
9
9
/**
@@ -16,20 +16,20 @@ document.addEventListener('DOMContentLoaded', function(event) {
16
16
. new_model ( {
17
17
model_module : '@jupyter-widgets/controls' ,
18
18
model_name : widgetType + 'Model' ,
19
- model_id : 'widget-1'
19
+ model_id : 'widget-1' ,
20
20
// Create a view for the model.
21
21
} )
22
- . then ( function ( model ) {
22
+ . then ( function ( model ) {
23
23
console . log ( widgetType + ' model created' ) ;
24
24
25
25
model . set ( {
26
26
description : description || '' ,
27
- value : value
27
+ value : value ,
28
28
} ) ;
29
29
30
30
return manager . create_view ( model ) ;
31
31
} , console . error . bind ( console ) )
32
- . then ( function ( view ) {
32
+ . then ( function ( view ) {
33
33
console . log ( widgetType + ' view created' ) ;
34
34
manager . display_view ( view ) ;
35
35
return view ;
@@ -48,26 +48,26 @@ document.addEventListener('DOMContentLoaded', function(event) {
48
48
model_id : 'widget-2' ,
49
49
state : {
50
50
source : null ,
51
- target : null
52
- }
51
+ target : null ,
52
+ } ,
53
53
// Set the link model state.
54
54
} )
55
- . then ( function ( link ) {
55
+ . then ( function ( link ) {
56
56
console . log ( 'link created' ) ;
57
57
58
- return Promise . all ( [ textArea , html ] ) . then ( function ( models ) {
58
+ return Promise . all ( [ textArea , html ] ) . then ( function ( models ) {
59
59
console . log ( 'setting link' ) ;
60
60
var textArea = models [ 0 ] ;
61
61
var html = models [ 1 ] ;
62
62
link . set ( {
63
63
source : [ textArea . model , 'value' ] ,
64
- target : [ html . model , 'value' ]
64
+ target : [ html . model , 'value' ] ,
65
65
} ) ;
66
66
link . save_changes ( ) ;
67
67
console . log ( 'link set' ) ;
68
68
} ) ;
69
69
} )
70
- . then ( function ( ) {
70
+ . then ( function ( ) {
71
71
var event = new Event ( 'widgetsRendered' ) ;
72
72
document . dispatchEvent ( event ) ;
73
73
} ) ;
0 commit comments