MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / conflict

Method conflict

src/common/style/CartoCSS.js:3767–3786  ·  view source on GitHub ↗
(filter)

Source from the content-addressed store, hash-verified

3765 }
3766
3767 conflict(filter) {
3768 var key = filter.key.toString(),
3769 value = filter.val.toString();
3770
3771 if (!isNaN(parseFloat(value))) {value = parseFloat(value);}
3772
3773 // if (a=b) && (a=c)
3774 // if (a=b) && (a!=b)
3775 // or (a!=b) && (a=b)
3776 if ((filter.op === '=' && this.filters[key + '='] !== undefined &&
3777 value != this.filters[key + '='].val.toString()) ||
3778 (filter.op === '!=' && this.filters[key + '='] !== undefined &&
3779 value == this.filters[key + '='].val.toString()) ||
3780 (filter.op === '=' && this.filters[key + '!='] !== undefined &&
3781 value === this.filters[key + '!='].val.toString())) {
3782 return filter.toString() + ' added to ' + this.toString() + ' produces an invalid filter';
3783 }
3784
3785 return false;
3786 }
3787
3788 add(filter, env) {
3789 var key = filter.key.toString(),

Callers 1

addMethod · 0.95

Calls 2

toStringMethod · 0.95
toStringMethod · 0.45

Tested by

no test coverage detected