Optional zIndex for stroke symbolizers
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user