Remove renderWebsocketOutput
and use printWebsocketOutput
instead
* The `render` command is not used much
* Originally added with commit 898074be3f
* The `#render` anchor (see findOrCreateRenderElement) was the "Render" button above the editor, nothing was rendered at all if executing code and otherwise it would be included _within_ the button.
This commit is contained in:
@ -84,16 +84,6 @@ var CodeOceanEditor = {
|
||||
}
|
||||
},
|
||||
|
||||
findOrCreateRenderElement: function (index) {
|
||||
if ($('#render-' + index).isPresent()) {
|
||||
return $('#render-' + index);
|
||||
} else {
|
||||
var element = $('<div>').attr('id', 'render-' + index);
|
||||
$('#render').append(element);
|
||||
return element;
|
||||
}
|
||||
},
|
||||
|
||||
getCardClass: function (result) {
|
||||
if (result.file_role === 'teacher_defined_linter') {
|
||||
return 'card bg-info text-white'
|
||||
|
@ -174,11 +174,6 @@ CodeOceanEditorEvaluation = {
|
||||
/**
|
||||
* Output-Logic
|
||||
*/
|
||||
renderWebsocketOutput: function (msg) {
|
||||
var element = this.findOrCreateRenderElement(0);
|
||||
element.append(msg.data);
|
||||
},
|
||||
|
||||
printWebsocketOutput: function (msg) {
|
||||
if (!msg.data || msg.data === "\r") {
|
||||
return;
|
||||
|
@ -44,7 +44,7 @@ CodeOceanEditorWebsocket = {
|
||||
this.websocket.on('clear', this.clearOutput.bind(this));
|
||||
this.websocket.on('turtle', this.handleTurtleCommand.bind(this));
|
||||
this.websocket.on('turtlebatch', this.handleTurtlebatchCommand.bind(this));
|
||||
this.websocket.on('render', this.renderWebsocketOutput.bind(this));
|
||||
this.websocket.on('render', this.printWebsocketOutput.bind(this));
|
||||
this.websocket.on('exit', this.handleExitCommand.bind(this));
|
||||
this.websocket.on('status', this.showStatus.bind(this));
|
||||
this.websocket.on('hint', this.showHint.bind(this));
|
||||
|
Reference in New Issue
Block a user