Fixed turtle.

This commit is contained in:
Alexander Kastius
2016-08-12 14:42:35 +02:00
parent fbb1cfb67b
commit 0ca52a9b8f
5 changed files with 22 additions and 45 deletions

View File

@@ -31,9 +31,7 @@ var CodeOceanEditor = {
runmode: this.NONE,
websocket: null,
turtlescreen: null,
numMessages: 0,
turtlecanvas: $('#turtlecanvas'),
prompt: $('#prompt'),
commands: ['input', 'write', 'turtle', 'turtlebatch', 'render', 'exit', 'timeout', 'status'],
streams: ['stdin', 'stdout', 'stderr'],
@@ -191,7 +189,7 @@ var CodeOceanEditor = {
resetSaveTimer: function () {
clearTimeout(this.autosaveTimer);
this.autosaveTimer = setTimeout(this.autosave, this.AUTOSAVE_INTERVAL);
this.autosaveTimer = setTimeout(this.autosave.bind(this), this.AUTOSAVE_INTERVAL);
},
autosave: function () {
@@ -478,18 +476,6 @@ var CodeOceanEditor = {
};
},
closeEventSource: function (event) {
event.target.close();
this.hideSpinner();
this.running = false;
this.toggleButtonStates();
if (event.type === 'error' || JSON.parse(event.data).code !== 200) {
this.ajaxError();
this.showTab(0);
}
},
showRequestedTab: function() {
if(this.REMEMBER_TAB){
var regexp = /tab=(\d+)/;