@@ -726,6 +726,7 @@ export class ExecutionVisualizer {
726726 function ( args ) {
727727 var obj = args . obj , d3DomElement = args . d3DomElement ;
728728 var typ = typeof obj ;
729+ // TODO: can probably simplify with default handling and getRealLabel:
729730 if ( obj == null )
730731 d3DomElement . append ( '<span class="nullObj">null</span>' ) ;
731732 else if ( typ == "number" )
@@ -799,32 +800,6 @@ export class ExecutionVisualizer {
799800 return [ false ] ;
800801 } ) ;
801802
802- this . add_pytutor_hook (
803- "end_constructor" ,
804- function ( args ) {
805- var myViz = args . myViz ;
806- if ( ( myViz . curTrace . length > 0 )
807- && myViz . curTrace [ myViz . curTrace . length - 1 ]
808- && myViz . curTrace [ myViz . curTrace . length - 1 ] . stdout ) {
809- myViz . hasStdout = true ;
810- myViz . stdoutLines = myViz . curTrace [ myViz . curTrace . length - 1 ] . stdout . split ( "\n" ) . length ;
811- }
812- // if last frame is a step limit
813- else if ( ( myViz . curTrace . length > 1 )
814- && myViz . curTrace [ myViz . curTrace . length - 2 ]
815- && myViz . curTrace [ myViz . curTrace . length - 2 ] . stdout ) {
816- myViz . hasStdout = true ;
817- myViz . stdoutLines = myViz . curTrace [ myViz . curTrace . length - 2 ] . stdout . split ( "\n" ) . length ;
818- }
819- else {
820- myViz . stdoutLines = - 1 ;
821- }
822- if ( myViz . hasStdout )
823- for ( var i = 0 ; i < myViz . curTrace . length ; i ++ )
824- if ( ! ( myViz . curTrace [ i ] . stdout ) )
825- myViz . curTrace [ i ] . stdout = " " ; // always show it, if it's ever used
826- } ) ;
827-
828803 this . add_pytutor_hook (
829804 "end_render" ,
830805 function ( args ) {
@@ -973,7 +948,6 @@ export class ExecutionVisualizer {
973948 } ;
974949 }
975950
976-
977951 // update fields corresponding to the current and previously executed lines
978952 // in the trace so that they can be properly highlighted; must call before
979953 // rendering code output (NB: argh pesky ordering dependency)
0 commit comments