simplifies invalidate

This commit is contained in:
Francisco Dans 2015-02-25 12:46:45 +01:00
parent 51fc104793
commit 3fe1c60d61

View File

@ -115,10 +115,7 @@ BallRenderer.prototype = {
},
invalidate: function(){
if(!this.imageData) this.imageData = this.ctx.createImageData(this.width, this.height);
this.pointList = new Uint8ClampedArray(this.size * 4);
this.imageData.data.set(this.pointList);
this.ctx.putImageData(this.imageData, 0, 0);
this.pointLayer = this.contourLayer = this.isoplethLayer = new Uint8ClampedArray(this.size * 4);
},
getRIndexPos: function(x,y){
var rIndexPos = (y*this.width+x)*4;