Optional zIndex for text symbolizers
This commit is contained in:
@@ -54,12 +54,21 @@ describe('ol.style.TextLiteral', function() {
|
||||
text: 'Text is not compared for equality',
|
||||
opacity: 0.5
|
||||
});
|
||||
var differentZIndex = new ol.style.TextLiteral({
|
||||
color: '#ff0000',
|
||||
fontFamily: 'Arial',
|
||||
fontSize: 11,
|
||||
text: 'Test',
|
||||
opacity: 0.5,
|
||||
zIndex: 3
|
||||
});
|
||||
expect(literal.equals(equalLiteral)).to.be(true);
|
||||
expect(literal.equals(differentLiteral1)).to.be(false);
|
||||
expect(literal.equals(differentLiteral2)).to.be(false);
|
||||
expect(literal.equals(differentLiteral3)).to.be(false);
|
||||
expect(literal.equals(differentLiteral4)).to.be(false);
|
||||
expect(literal.equals(equalLiteral2)).to.be(true);
|
||||
expect(literal.equals(differentZIndex)).to.be(false);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -26,6 +26,18 @@ describe('ol.style.Text', function() {
|
||||
expect(symbolizer).to.be.a(ol.style.Text);
|
||||
});
|
||||
|
||||
it('accepts zIndex', function() {
|
||||
var symbolizer = new ol.style.Text({
|
||||
color: '#ff0000',
|
||||
fontFamily: 'Arial',
|
||||
fontSize: 11,
|
||||
text: 'Test',
|
||||
opacity: 0.6,
|
||||
zIndex: 3
|
||||
});
|
||||
expect(symbolizer).to.be.a(ol.style.Text);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('#createLiteral()', function() {
|
||||
|
||||
Reference in New Issue
Block a user