Hide Turtle Canvas during cleanup
This commit is contained in:
@ -136,6 +136,7 @@ CodeOceanEditorEvaluation = {
|
|||||||
|
|
||||||
clearOutput: function() {
|
clearOutput: function() {
|
||||||
$('#output pre').remove();
|
$('#output pre').remove();
|
||||||
|
CodeOceanEditorTurtle.hideCanvas();
|
||||||
},
|
},
|
||||||
|
|
||||||
clearScoringOutput: function() {
|
clearScoringOutput: function() {
|
||||||
|
@ -37,12 +37,16 @@ CodeOceanEditorTurtle = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
showCanvas: function () {
|
showCanvas: function () {
|
||||||
if ($('#turtlediv').isPresent()
|
if ($('#turtlediv').isPresent() && this.turtlecanvas.hasClass('d-none')) {
|
||||||
&& this.turtlecanvas.hasClass('d-none')) {
|
|
||||||
// initialize two-column layout
|
|
||||||
$('#output-col1').addClass('col-lg-7 col-md-7 two-column');
|
|
||||||
this.turtlecanvas.removeClass('d-none');
|
this.turtlecanvas.removeClass('d-none');
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
hideCanvas: function () {
|
||||||
|
const turtlecanvas = $('#turtlecanvas');
|
||||||
|
if ($('#turtlediv').isPresent() && !turtlecanvas.hasClass('d-none')) {
|
||||||
|
turtlecanvas.addClass('d-none');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
Reference in New Issue
Block a user