conveys draw calls in flush method
This commit is contained in:
parent
8e8ae30dc8
commit
7f72ae01af
@ -161,16 +161,15 @@ BallRenderer.prototype = {
|
||||
var neighbors = this.getNeighbors(i);
|
||||
for (var n = 0, ln = neighbors.length; n<ln; n++){
|
||||
var index = neighbors[n];
|
||||
if(this.contourLayer[index+3] === 0 || this.contourLayer[index+3]!==this.contourLayer[i+3]){
|
||||
if(this.contourLayer[index+3] === 0 || this.contourLayer[index+3] !== this.contourLayer[i+3]){
|
||||
this.isoplethLayer[index+3] = 255;
|
||||
this.isoplethLayer[index] = this.contourLayer[index+3];
|
||||
this.isoplethLayer[index+1] = this.contourLayer[index+3];
|
||||
this.isoplethLayer[index+2] = this.contourLayer[index+3];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//this.invalidate();
|
||||
this.draw(this.isoplethLayer);
|
||||
},
|
||||
colorize: function (pixels, gradient) {
|
||||
for (var i = 3, len = pixels.length, j; i < len; i += 4) {
|
||||
|
@ -395,6 +395,14 @@ var ballRenderer = require('./ball.js');
|
||||
this._filters.draw();
|
||||
}
|
||||
}
|
||||
},
|
||||
flush: function(){
|
||||
this._ctx.setTransform(1, 0, 0, 1, 0, 0);
|
||||
if(!this.ballRenderer) return;
|
||||
this.ballRenderer.contour(8);
|
||||
this.ballRenderer.isopleth();
|
||||
this.ballRenderer.draw();
|
||||
this.ballRenderer.invalidate();
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user