updated carto library #21

This commit is contained in:
javi 2013-11-18 17:29:51 +01:00
parent 9247f1b390
commit 9fac885679

7
vendor/carto.js vendored
View File

@ -4811,7 +4811,7 @@ tree.Value.prototype.toJS = function() {
//var v = this.value[0].value[0];
var val = this.eval()
var v = val.toString();
if(val.is === "color" || val.is === 'uri') {
if(val.is === "color" || val.is === 'uri' || val.is === 'string') {
v = "'" + v + "'";
} else if (val.is === 'field') {
// replace [varuable] by ctx['variable']
@ -4996,6 +4996,11 @@ CartoCSS.Layer.prototype = {
return this.fullName().split('::')[1];
},
eval: function(prop) {
var p = this.shader[prop];
if (!p) return;
return p({}, { zoom: 0, 'frame-offset': 0 });
},
/*
* `target`: style, 'svg', 'canvas-2d'...