Default value for zIndex

This commit is contained in:
Tim Schaub
2013-10-02 16:37:19 -06:00
parent 43c581ef5f
commit bfa257eac1
20 changed files with 262 additions and 124 deletions
+22 -15
View File
@@ -10,49 +10,56 @@ describe('ol.style.TextLiteral', function() {
fontFamily: 'Arial',
fontSize: 11,
text: 'Test',
opacity: 0.5
opacity: 0.5,
zIndex: 0
});
var equalLiteral = new ol.style.TextLiteral({
color: '#ff0000',
fontFamily: 'Arial',
fontSize: 11,
text: 'Test',
opacity: 0.5
opacity: 0.5,
zIndex: 0
});
var differentLiteral1 = new ol.style.TextLiteral({
var differentColor = new ol.style.TextLiteral({
color: '#0000ff',
fontFamily: 'Arial',
fontSize: 11,
text: 'Test',
opacity: 0.5
opacity: 0.5,
zIndex: 0
});
var differentLiteral2 = new ol.style.TextLiteral({
var differentFontFamily = new ol.style.TextLiteral({
color: '#ff0000',
fontFamily: 'Dingbats',
fontSize: 11,
text: 'Test',
opacity: 0.5
opacity: 0.5,
zIndex: 0
});
var differentLiteral3 = new ol.style.TextLiteral({
var differentFontSize = new ol.style.TextLiteral({
color: '#ff0000',
fontFamily: 'Arial',
fontSize: 12,
text: 'Test',
opacity: 0.5
opacity: 0.5,
zIndex: 0
});
var differentLiteral4 = new ol.style.TextLiteral({
var differentOpacity = new ol.style.TextLiteral({
color: '#ff0000',
fontFamily: 'Arial',
fontSize: 11,
text: 'Test',
opacity: 0.6
opacity: 0.6,
zIndex: 0
});
var equalLiteral2 = new ol.style.TextLiteral({
color: '#ff0000',
fontFamily: 'Arial',
fontSize: 11,
text: 'Text is not compared for equality',
opacity: 0.5
opacity: 0.5,
zIndex: 0
});
var differentZIndex = new ol.style.TextLiteral({
color: '#ff0000',
@@ -63,10 +70,10 @@ describe('ol.style.TextLiteral', function() {
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(differentColor)).to.be(false);
expect(literal.equals(differentFontFamily)).to.be(false);
expect(literal.equals(differentFontSize)).to.be(false);
expect(literal.equals(differentOpacity)).to.be(false);
expect(literal.equals(equalLiteral2)).to.be(true);
expect(literal.equals(differentZIndex)).to.be(false);
});