fixed rendered to cumulative option
This commit is contained in:
parent
cd60c01a0d
commit
c47d957674
@ -104,13 +104,17 @@
|
||||
//
|
||||
_renderTile: function(tile, key, frame_offset, sprites, shader, shaderVars) {
|
||||
if(!this._canvas) return;
|
||||
|
||||
var prof = Profiler.metric('PointRenderer:renderTile').start();
|
||||
var ctx = this._ctx;
|
||||
//var res = 1;//this.options.resolution;
|
||||
var activePixels = tile.timeCount[key];
|
||||
|
||||
if(this.options.blendmode) {
|
||||
ctx.globalCompositeOperation = this.options.blendmode;
|
||||
}
|
||||
if (this.options.cumulative && key > tile.maxDate) {
|
||||
key = tile.maxDate - 1;
|
||||
}
|
||||
var activePixels = tile.timeCount[key];
|
||||
if(activePixels) {
|
||||
var pixelIndex = tile.timeIndex[key];
|
||||
for(var p = 0; p < activePixels; ++p) {
|
||||
@ -124,8 +128,8 @@
|
||||
//var x = tile.x[posIdx]*res - (sp.width >> 1);
|
||||
//var y = (256 - res - res*tile.y[posIdx]) - (sp.height >> 1);
|
||||
var x = tile.x[posIdx]- (sp.width >> 1);
|
||||
var y = (256 - 1 - tile.y[posIdx]) - (sp.height >> 1);
|
||||
ctx.drawImage(sp, x, y);
|
||||
var y = 255 - tile.y[posIdx]; // flip mercator
|
||||
ctx.drawImage(sp, x, y - (sp.height >> 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user