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