diff -r 12f782a13fa2 -r 119b6193c493 client/annotviz/app/js/stageview.js --- a/client/annotviz/app/js/stageview.js Fri Jan 23 09:57:03 2015 +0100 +++ b/client/annotviz/app/js/stageview.js Fri Jan 23 09:58:21 2015 +0100 @@ -37,13 +37,13 @@ var sceneHeight = opts.sceneHeight; var canvasContainer = opts.canvasContainer; var timeContainer = []; - var components = []; - + var components = []; + //create an new instance of a pixi stage this.stage = new PIXI.Stage(sceneBgColor); //create a renderer instance. var renderer = PIXI.autoDetectRenderer(sceneWidth, sceneHeight); - + this.init = function() { if(typeof(canvasContainer) === 'string') { @@ -54,16 +54,16 @@ } canvasContainer.appendChild(renderer.view); - + components.forEach(function(c){ c.init(); }); }; - + this.registerTimeContainer = function(container) { timeContainer.push(container); }; - + this.registerComponent = function(component) { components.push(component); this.stage.addChild(component.container); @@ -84,7 +84,7 @@ if(!externalRefresh) { refreshInterval = setInterval(function() {_this.refresh();}, 1000/this.framerate); } - + components.forEach(function(c){ c.start(); }); @@ -94,7 +94,6 @@ if(!externalRefresh) { clearInterval(refreshInterval); } - clearInterval(refreshTimeInterval); components.forEach(function(c){ c.stop();