adds pos to parameters

This commit is contained in:
Francisco Dans 2016-01-18 10:29:15 +01:00
parent 7441a95b1a
commit 01b30d18ca
2 changed files with 4 additions and 6 deletions

View File

@ -244,7 +244,7 @@ L.TorqueLayer = L.CanvasLayer.extend({
// all the points
this.renderer._ctx.drawImage(tile._tileCache, 0, 0);
} else {
this.renderer.renderTile(tile, this.keys);
this.renderer.renderTile(tile, this.keys, pos);
}
}
}

View File

@ -172,7 +172,7 @@ var Filters = require('./torque_filters');
//
// 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) {
this.on('allIconsLoaded', function() {
this.renderTile.apply(this, [tile, keys, callback]);
@ -196,15 +196,13 @@ var Filters = require('./torque_filters');
var frame = layer.frames()[fr];
var fr_sprites = sprites[frame] || (sprites[frame] = []);
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);
return callback && callback(null);
},
_createCanvas: function() {
@ -248,7 +246,7 @@ var Filters = require('./torque_filters');
// renders a tile in the canvas for key defined in
// 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;
var prof = Profiler.metric('torque.renderer.point.renderTile').start();