From 9fac88567977915f604cb0b0e52191362314551c Mon Sep 17 00:00:00 2001 From: javi Date: Mon, 18 Nov 2013 17:29:51 +0100 Subject: [PATCH] updated carto library #21 --- vendor/carto.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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'...