Skip to content

Commit 5f14ffc

Browse files
committed
bam
1 parent 5a9c27b commit 5f14ffc

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

‎v3/js/opt-frontend.js‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -330,10 +330,14 @@ function executeCode(forceStartingInstr) {
330330
textualMemoryLabels: ($('#textualMemoryLabelsSelector').val() == 'true'),
331331
showOnlyOutputs: ($('#showOnlyOutputsSelector').val() == 'true'),
332332
executeCodeWithRawInputFunc: executeCodeWithRawInput,
333-
// if TogetherJS is enabled, always use the same
334-
// visualizer ID for all ExecutionVisualizer
335-
// objects, so that they can sync properly
336-
visualizerIdOverride: enableTogetherJS ? '1' : undefined,
333+
334+
// always use the same visualizer ID for all
335+
// instantiated ExecutionVisualizer objects,
336+
// so that they can sync properly across
337+
// multiple clients using TogetherJS. this
338+
// shouldn't lead to problems since only ONE
339+
// ExecutionVisualizer will be shown at a time
340+
visualizerIdOverride: '1',
337341
updateOutputCallback: function() {$('#urlOutput,#embedCodeOutput').val('');},
338342

339343
// undocumented experimental modes:
@@ -389,7 +393,7 @@ $(document).ready(function() {
389393
isTutor = (role == 'tutor'); // GLOBAL
390394

391395
if (enableTogetherJS || isTutor) {
392-
initTogetherJS(); // can also call this manually to test
396+
initTogetherJS();
393397
}
394398

395399

0 commit comments

Comments
 (0)