Optional zIndex for stroke symbolizers

This commit is contained in:
Tim Schaub
2013-08-26 15:27:45 -06:00
parent 04a23d0e45
commit 33cacab11c
5 changed files with 69 additions and 10 deletions

View File

@@ -30,10 +30,17 @@ describe('ol.style.LineLiteral', function() {
color: '#BADA55',
opacity: 0.5
});
var differentZIndex = new ol.style.LineLiteral({
width: 3,
color: '#BADA55',
opacity: 1,
zIndex: 3
});
expect(literal.equals(equalLiteral)).to.be(true);
expect(literal.equals(differentColor)).to.be(false);
expect(literal.equals(differentWidth)).to.be(false);
expect(literal.equals(differentOpacity)).to.be(false);
expect(literal.equals(differentZIndex)).to.be(false);
});
});

View File

@@ -20,6 +20,15 @@ describe('ol.style.Stroke', function() {
expect(symbolizer).to.be.a(ol.style.Stroke);
});
it('accepts zIndex', function() {
var symbolizer = new ol.style.Stroke({
opacity: ol.expr.parse('value / 100'),
width: ol.expr.parse('widthAttr'),
zIndex: 5
});
expect(symbolizer).to.be.a(ol.style.Stroke);
});
});
describe('#createLiteral()', function() {
@@ -40,6 +49,7 @@ describe('ol.style.Stroke', function() {
expect(literal).to.be.a(ol.style.LineLiteral);
expect(literal.opacity).to.be(42 / 100);
expect(literal.width).to.be(1.5);
expect(literal.zIndex).to.be(undefined);
});
it('applies the default values', function() {