not removing canvas from DOM anymore, fixes #63

This commit is contained in:
Jeena 2014-06-07 12:07:54 +02:00
parent 9f0d173a82
commit 9ec3324c29
4 changed files with 9 additions and 14 deletions

View file

@ -8,7 +8,7 @@ define([
function (Settings, Nc, Stats, Screenfull) {
function DomController() {
this.canvas = null;
this.canvas = document.getElementById("canvas");
this.debugCanvas = null;
this.stats = null;
this.ping = null;
@ -116,15 +116,8 @@ function (Settings, Nc, Stats, Screenfull) {
return this.canvas;
}
DomController.prototype.setCanvas = function (canvas) {
var container = this.getCanvasContainer();
if(this.canvas) {
container.removeChild(this.canvas);
}
this.canvas = canvas;
container.appendChild(canvas);
DomController.prototype.initCanvas = function (canvas) {
Nc.trigger(Nc.ns.client.view.fullscreen.change, Screenfull.isFullscreen);
}
DomController.prototype.getDebugCanvas = function () {