Using a renderIntent lib function instead of this identifier
A 'this' identifier is quite useless with compressed JavaScript, and in fact it turned out to fail in advanced mode when trying to access a feature's renderIntent property with it. The added renderIntent lib function as a Call expression does the job well.
This commit is contained in:
@@ -624,25 +624,6 @@ describe('ol.expr.Not', function() {
|
||||
});
|
||||
|
||||
|
||||
describe('ol.expr.ThisIdentifier', function() {
|
||||
|
||||
describe('#getInstance()', function() {
|
||||
it('has a getInstance method to return the singleton', function() {
|
||||
expect(ol.expr.ThisIdentifier.getInstance())
|
||||
.to.be.a(ol.expr.ThisIdentifier);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#evaluate()', function() {
|
||||
it('evaluates to the passed scope', function() {
|
||||
expect(ol.expr.ThisIdentifier.getInstance()
|
||||
.evaluate(undefined, undefined, 'foo')).to.be('foo');
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
goog.require('ol.expr.Call');
|
||||
goog.require('ol.expr.Comparison');
|
||||
goog.require('ol.expr.ComparisonOp');
|
||||
@@ -655,4 +636,3 @@ goog.require('ol.expr.Math');
|
||||
goog.require('ol.expr.MathOp');
|
||||
goog.require('ol.expr.Member');
|
||||
goog.require('ol.expr.Not');
|
||||
goog.require('ol.expr.ThisIdentifier');
|
||||
|
||||
Reference in New Issue
Block a user