adds pos to parameters
This commit is contained in:
parent
7441a95b1a
commit
01b30d18ca
@ -244,7 +244,7 @@ L.TorqueLayer = L.CanvasLayer.extend({
|
|||||||
// all the points
|
// all the points
|
||||||
this.renderer._ctx.drawImage(tile._tileCache, 0, 0);
|
this.renderer._ctx.drawImage(tile._tileCache, 0, 0);
|
||||||
} else {
|
} else {
|
||||||
this.renderer.renderTile(tile, this.keys);
|
this.renderer.renderTile(tile, this.keys, pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -172,7 +172,7 @@ var Filters = require('./torque_filters');
|
|||||||
//
|
//
|
||||||
// renders all the layers (and frames for each layer) from cartocss
|
// renders all the layers (and frames for each layer) from cartocss
|
||||||
//
|
//
|
||||||
renderTile: function(tile, keys, callback) {
|
renderTile: function(tile, keys, pos) {
|
||||||
if (this._iconsToLoad > 0) {
|
if (this._iconsToLoad > 0) {
|
||||||
this.on('allIconsLoaded', function() {
|
this.on('allIconsLoaded', function() {
|
||||||
this.renderTile.apply(this, [tile, keys, callback]);
|
this.renderTile.apply(this, [tile, keys, callback]);
|
||||||
@ -196,15 +196,13 @@ var Filters = require('./torque_filters');
|
|||||||
var frame = layer.frames()[fr];
|
var frame = layer.frames()[fr];
|
||||||
var fr_sprites = sprites[frame] || (sprites[frame] = []);
|
var fr_sprites = sprites[frame] || (sprites[frame] = []);
|
||||||
for (var k = 0, len = keys.length; k < len; k++) {
|
for (var k = 0, len = keys.length; k < len; k++) {
|
||||||
this._renderTile(tile, keys[k] - frame, frame, fr_sprites, layer);
|
this._renderTile(tile, keys[k] - frame, frame, fr_sprites, layer, undefined, pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
prof.end(true);
|
prof.end(true);
|
||||||
|
|
||||||
return callback && callback(null);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_createCanvas: function() {
|
_createCanvas: function() {
|
||||||
@ -248,7 +246,7 @@ var Filters = require('./torque_filters');
|
|||||||
// renders a tile in the canvas for key defined in
|
// renders a tile in the canvas for key defined in
|
||||||
// the torque tile
|
// the torque tile
|
||||||
//
|
//
|
||||||
_renderTile: function(tile, key, frame_offset, sprites, shader, shaderVars) {
|
_renderTile: function(tile, key, frame_offset, sprites, shader, shaderVars, pos) {
|
||||||
if (!this._canvas) return;
|
if (!this._canvas) return;
|
||||||
|
|
||||||
var prof = Profiler.metric('torque.renderer.point.renderTile').start();
|
var prof = Profiler.metric('torque.renderer.point.renderTile').start();
|
||||||
|
Loading…
Reference in New Issue
Block a user