File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,16 +14,18 @@ let vars_in_scope = {
1414
1515function exec_cell ( id , count ) {
1616
17+ window . current_cell = id ;
1718 let global_scope = ( "global" , eval ) ( vars_in_scope [ id ] . getValue ( ) )
1819
1920 if ( Array . isArray ( global_scope ) ) {
2021 global_scope = print_val ( global_scope )
2122 }
22- $ ( `#out_${ id } ` ) . html ( global_scope || "" ) ;
23+ $ ( `#out_${ id } ` ) . html ( global_scope ) ;
2324
2425 count = parseInt ( count ) + 1
2526 let div_count = `div-${ count } `
2627
28+ window . current_cell = div_count
2729 if ( ! ( div_count in vars_in_scope ) ) {
2830 $ ( "#container" ) . append (
2931 `<div id=${ div_count } class=""></div><br />
Original file line number Diff line number Diff line change @@ -76,4 +76,15 @@ function print_val(val){
7676 return data_string ;
7777
7878 }
79+ }
80+
81+ function viz ( name , callback ) {
82+
83+ let id = `#out_${ window . current_cell } `
84+ $ ( `${ id } ` ) . append ( `<div id=${ name } ></div>` )
85+
86+ let cb = callback ( name ) ;
87+ // $("#ploty").remove(`${name}`)
88+
89+ return cb
7990}
Original file line number Diff line number Diff line change 4747 </div >
4848 <div class =" col-md-1" ></div >
4949 <div id =" out_div-1" class =" col-md-10 out-divs" >
50-
5150 </div >
52- </div >
5351
52+ </div >
53+ <div id =" ploty" ></div >
5454 </div >
5555
5656
You can’t perform that action at this time.
0 commit comments