fixed rendering when variables were used
This commit is contained in:
parent
2dcbacd763
commit
ed705f1a90
@ -172,6 +172,7 @@
|
||||
return {
|
||||
x: x,
|
||||
y: y,
|
||||
z: zoom,
|
||||
coord: {
|
||||
x: coord.x,
|
||||
y: coord.y,
|
||||
|
@ -135,7 +135,7 @@
|
||||
if(c) {
|
||||
var sp = sprites[c];
|
||||
if(!sp) {
|
||||
sp = sprites[c] = this.generateSprite(shader, c, _.extend({ zoom: tile.zoom, 'frame-offset': frame_offset }, shaderVars));
|
||||
sp = sprites[c] = this.generateSprite(shader, c, _.extend({ zoom: tile.z, 'frame-offset': frame_offset }, shaderVars));
|
||||
}
|
||||
//var x = tile.x[posIdx]*res - (sp.width >> 1);
|
||||
//var y = (256 - res - res*tile.y[posIdx]) - (sp.height >> 1);
|
||||
|
2
vendor/carto.js
vendored
2
vendor/carto.js
vendored
@ -4815,7 +4815,7 @@ tree.Value.prototype.toJS = function() {
|
||||
v = "'" + v + "'";
|
||||
} else if (val.is === 'field') {
|
||||
// replace [varuable] by ctx['variable']
|
||||
v = v.replace(/\[(.*)\]/g, "ctx['\$1']")
|
||||
v = v.replace(/\[(.*)\]/g, "data['\$1']")
|
||||
}
|
||||
return "_value = " + v + ";";
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user