Skip to content

Commit 980295d

Browse files
committed
minor fix
1 parent ef6f5e7 commit 980295d

2 files changed

Lines changed: 27 additions & 28 deletions

File tree

‎v3/js/opt-frontend.js‎

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -110,40 +110,40 @@ function TogetherjsCloseHandler() {
110110
}
111111

112112
function getBaseBackendOptionsObj() {
113-
var backendOptionsObj = {cumulative_mode: ($('#cumulativeModeSelector').val() == 'true'),
114-
heap_primitives: ($('#heapPrimitivesSelector').val() == 'true'),
115-
show_only_outputs: false,
116-
py_crazy_mode: ($('#pythonVersionSelector').val() == '2crazy'),
117-
origin: originFrontendJsFile};
113+
var ret = {cumulative_mode: ($('#cumulativeModeSelector').val() == 'true'),
114+
heap_primitives: ($('#heapPrimitivesSelector').val() == 'true'),
115+
show_only_outputs: false,
116+
py_crazy_mode: ($('#pythonVersionSelector').val() == '2crazy'),
117+
origin: originFrontendJsFile};
118118

119119
var surveyObj = getSurveyObject();
120120
if (surveyObj) {
121-
backendOptionsObj.survey = surveyObj;
121+
ret.survey = surveyObj;
122122
}
123123

124-
return backendOptionsObj;
124+
return ret;
125125
}
126126

127127
function getBaseFrontendOptionsObj() {
128-
var frontendOptionsObj = {// tricky: selector 'true' and 'false' values are strings!
129-
disableHeapNesting: ($('#heapPrimitivesSelector').val() == 'true'),
130-
textualMemoryLabels: ($('#textualMemoryLabelsSelector').val() == 'true'),
131-
executeCodeWithRawInputFunc: executeCodeWithRawInput,
132-
133-
// always use the same visualizer ID for all
134-
// instantiated ExecutionVisualizer objects,
135-
// so that they can sync properly across
136-
// multiple clients using TogetherJS. this
137-
// shouldn't lead to problems since only ONE
138-
// ExecutionVisualizer will be shown at a time
139-
visualizerIdOverride: '1',
140-
updateOutputCallback: function() {$('#urlOutput,#embedCodeOutput').val('');},
141-
142-
// undocumented experimental modes:
143-
pyCrazyMode: ($('#pythonVersionSelector').val() == '2crazy'),
144-
holisticMode: ($('#cumulativeModeSelector').val() == 'holistic')
145-
}
146-
return frontendOptionsObj;
128+
var ret = {// tricky: selector 'true' and 'false' values are strings!
129+
disableHeapNesting: ($('#heapPrimitivesSelector').val() == 'true'),
130+
textualMemoryLabels: ($('#textualMemoryLabelsSelector').val() == 'true'),
131+
executeCodeWithRawInputFunc: executeCodeWithRawInput,
132+
133+
// always use the same visualizer ID for all
134+
// instantiated ExecutionVisualizer objects,
135+
// so that they can sync properly across
136+
// multiple clients using TogetherJS. this
137+
// shouldn't lead to problems since only ONE
138+
// ExecutionVisualizer will be shown at a time
139+
visualizerIdOverride: '1',
140+
updateOutputCallback: function() {$('#urlOutput,#embedCodeOutput').val('');},
141+
142+
// undocumented experimental modes:
143+
pyCrazyMode: ($('#pythonVersionSelector').val() == '2crazy'),
144+
holisticMode: ($('#cumulativeModeSelector').val() == 'holistic')
145+
};
146+
return ret;
147147
}
148148

149149
function executeCode(forceStartingInstr, forceRawInputLst) {
@@ -167,7 +167,6 @@ function executeCode(forceStartingInstr, forceRawInputLst) {
167167
}
168168

169169

170-
171170
// domID is the ID of the element to attach to (without the leading '#' sign)
172171
function SyntaxErrorSurveyBubble(parentViz, domID) {
173172
this.parentViz = parentViz;

‎v3/visualize.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@
238238
</div>
239239

240240

241-
<div id="testCasesPane"/>
241+
<div id="testCasesPane"></div>
242242

243243

244244
<p style="margin-top: 25px; font-weight: bold;">Python Examples</p>

0 commit comments

Comments
 (0)