diff --git a/vendor/carto.js b/vendor/carto.js index 292399e..e87ea8c 100644 --- a/vendor/carto.js +++ b/vendor/carto.js @@ -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'...