Expose filtered field
This commit is contained in:
parent
a3538d9007
commit
72f93abf16
@ -229,6 +229,8 @@ CartoCSS.prototype = {
|
||||
// serach the max index to know rendering order
|
||||
lyr.index = _.max(props[v].map(function(a) { return a.index; }).concat(lyr.index));
|
||||
lyr.constant = !_.any(props[v].map(function(a) { return !a.constant; }));
|
||||
// True when the property is filtered.
|
||||
lyr.filtered = props[v][0].filtered;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -236,7 +236,11 @@ tree.Definition.prototype.toJS = function(env) {
|
||||
}
|
||||
|
||||
r.constant = rule.value.ev(env).is !== 'field';
|
||||
r.filtered = !!_if;
|
||||
var DEFAULT_FILTER = "(8388607 & (1 << ctx.zoom))";
|
||||
r.filtered = false;
|
||||
if (_if && _if !== DEFAULT_FILTER){
|
||||
r.filtered = true;
|
||||
}
|
||||
|
||||
shaderAttrs[rule.name].push(r);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user