@@ -82,8 +82,9 @@ var curVisualizerID = 1; // global to uniquely identify each ExecutionVisualizer
8282// codeDivWidth - maximum width of #pyCodeOutputDiv (in integer pixels)
8383// editCodeBaseURL - the base URL to visit when the user clicks 'Edit code' (if null, then 'Edit code' link hidden)
8484// allowEditAnnotations - allow user to edit per-step annotations (default: false)
85- // embeddedMode - shortcut for hideOutput=true, allowEditAnnotations=false
86- // codeDivWidth=350, codeDivHeight=400
85+ // embeddedMode - shortcut for hideOutput=true, allowEditAnnotations=false,
86+ // codeDivWidth=this.DEFAULT_EMBEDDED_CODE_DIV_WIDTH,
87+ // codeDivHeight=this.DEFAULT_EMBEDDED_CODE_DIV_HEIGHT
8788// disableHeapNesting - if true, then render all heap objects at the top level (i.e., no nested objects)
8889// drawParentPointers - if true, then draw environment diagram parent pointers for all frames
8990// WARNING: there are hard-to-debug MEMORY LEAKS associated with activating this option
@@ -109,6 +110,8 @@ function ExecutionVisualizer(domRootID, dat, params) {
109110 this . curInputCode = dat . code . rtrim ( ) ; // kill trailing spaces
110111 this . curTrace = dat . trace ;
111112
113+ this . DEFAULT_EMBEDDED_CODE_DIV_WIDTH = 350 ;
114+ this . DEFAULT_EMBEDDED_CODE_DIV_HEIGHT = 400 ;
112115
113116 // optional filtering to remove redundancy ...
114117 // ok, we're gonna filter out all trace entries of 'call' events,
@@ -419,11 +422,11 @@ ExecutionVisualizer.prototype.render = function() {
419422
420423 // don't override if they've already been set!
421424 if ( this . params . codeDivWidth === undefined ) {
422- this . params . codeDivWidth = 350 ;
425+ this . params . codeDivWidth = this . DEFAULT_EMBEDDED_CODE_DIV_WIDTH ;
423426 }
424427
425428 if ( this . params . codeDivHeight === undefined ) {
426- this . params . codeDivHeight = 400 ;
429+ this . params . codeDivHeight = this . DEFAULT_EMBEDDED_CODE_DIV_HEIGHT ;
427430 }
428431
429432 this . allowEditAnnotations = false ;
0 commit comments