added utility function eval to get the real value for a property
This commit is contained in:
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…
Reference in New Issue
Block a user