added utility function eval to get the real value for a property

pull/1/merge
javi 11 years ago
parent 66d7c45a0c
commit fadcb3391d

@ -192,6 +192,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'...

Loading…
Cancel
Save