passes pos all the way to the renderer

This commit is contained in:
Francisco Dans 2015-08-12 11:36:50 +02:00
parent 818c705a70
commit 1b6e571563

View File

@ -174,7 +174,7 @@ var contour = require('./contour');
//
// renders all the layers (and frames for each layer) from cartocss
//
renderTile: function(tile, key, callback) {
renderTile: function(tile, key, pos) {
if (this._iconsToLoad > 0) {
this.on('allIconsLoaded', function() {
this.renderTile.apply(this, [tile, key, callback]);
@ -191,14 +191,12 @@ var contour = require('./contour');
for(var fr = 0; fr < layer.frames().length; ++fr) {
var frame = layer.frames()[fr];
var fr_sprites = sprites[frame] || (sprites[frame] = []);
this._renderTile(tile, key - frame, frame, fr_sprites, layer);
this._renderTile(tile, key - frame, frame, fr_sprites, layer, pos);
}
}
}
prof.end(true);
return callback && callback(null);
},
_gridData(tile){
@ -260,7 +258,7 @@ var contour = require('./contour');
// 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, pos) {
if (!this._canvas) return;
var prof = Profiler.metric('torque.renderer.point.renderTile').start();