@@ -35,6 +35,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3535
3636
3737var appMode = 'edit' ; // 'edit', 'display', or 'display_no_frills'
38+ // also support 'visualize' for backward
39+ // compatibility (it's the same as 'display')
3840
3941var preseededCurInstr = null ; // if you passed in a 'curInstr=<number>' in the URL, then set this var
4042
@@ -92,7 +94,7 @@ $(document).ready(function() {
9294 myVisualizer . destroyAllAnnotationBubbles ( ) ;
9395 }
9496 }
95- else if ( appMode == 'display' ) {
97+ else if ( appMode == 'display' || appMode == 'visualize' /* 'visualize' is deprecated */ ) {
9698 $ ( "#pyInputPane" ) . hide ( ) ;
9799 $ ( "#pyOutputPane" ) . show ( ) ;
98100
@@ -489,7 +491,8 @@ $(document).ready(function() {
489491
490492
491493 appMode = $ . bbq . getState ( 'mode' ) ; // assign this to the GLOBAL appMode
492- if ( ( appMode == "display" ) && queryStrOptions . preseededCode /* jump to display only with pre-seeded code */ ) {
494+ if ( ( appMode == 'display' || appMode == 'visualize' /* 'visualize' is deprecated */ ) &&
495+ queryStrOptions . preseededCode /* jump to display only with pre-seeded code */ ) {
493496 preseededCurInstr = queryStrOptions . preseededCurInstr ; // ugly global
494497 $ ( "#executeBtn" ) . trigger ( 'click' ) ;
495498 }
@@ -519,7 +522,7 @@ $(document).ready(function() {
519522
520523 // redraw connector arrows on window resize
521524 $ ( window ) . resize ( function ( ) {
522- if ( appMode == 'display' ) {
525+ if ( appMode == 'display' || appMode == 'visualize' /* 'visualize' is deprecated */ ) {
523526 myVisualizer . redrawConnectors ( ) ;
524527 }
525528 } ) ;
@@ -534,7 +537,7 @@ $(document).ready(function() {
534537 showOnlyOutputs : $ ( '#showOnlyOutputsSelector' ) . val ( ) ,
535538 py : $ ( '#pythonVersionSelector' ) . val ( ) } ;
536539
537- if ( appMode == 'display' ) {
540+ if ( appMode == 'display' || appMode == 'visualize' /* 'visualize' is deprecated */ ) {
538541 myArgs . curInstr = myVisualizer . curInstr ;
539542 }
540543
@@ -544,7 +547,7 @@ $(document).ready(function() {
544547
545548
546549 $ ( '#genEmbedBtn' ) . bind ( 'click' , function ( ) {
547- assert ( appMode == 'display' ) ;
550+ assert ( appMode == 'display' || appMode == 'visualize' /* 'visualize' is deprecated */ ) ;
548551 var myArgs = { code : pyInputCodeMirror . getValue ( ) ,
549552 cumulative : $ ( '#cumulativeModeSelector' ) . val ( ) ,
550553 heapPrimitives : $ ( '#heapPrimitivesSelector' ) . val ( ) ,
0 commit comments