Optional zIndex for text symbolizers

This commit is contained in:
Tim Schaub
2013-08-26 15:50:45 -06:00
parent b9a44d2db5
commit 43c581ef5f
5 changed files with 69 additions and 7 deletions

View File

@@ -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);
});
});

View File

@@ -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() {