Lint
This commit is contained in:
@@ -95,17 +95,23 @@ ol.style.Polygon = function(options) {
|
|||||||
if (goog.isDefAndNotNull(options.strokeColor) ||
|
if (goog.isDefAndNotNull(options.strokeColor) ||
|
||||||
goog.isDefAndNotNull(options.strokeWidth)) {
|
goog.isDefAndNotNull(options.strokeWidth)) {
|
||||||
|
|
||||||
strokeColor = !goog.isDefAndNotNull(options.strokeColor) ?
|
if (goog.isDefAndNotNull(options.strokeColor)) {
|
||||||
new ol.expression.Literal(ol.style.PolygonDefaults.strokeColor) :
|
strokeColor = (options.strokeColor instanceof ol.expression.Expression) ?
|
||||||
(options.strokeColor instanceof ol.expression.Expression) ?
|
|
||||||
options.strokeColor :
|
options.strokeColor :
|
||||||
new ol.expression.Literal(options.strokeColor);
|
new ol.expression.Literal(options.strokeColor);
|
||||||
|
} else {
|
||||||
|
strokeColor = new ol.expression.Literal(
|
||||||
|
/** @type {string} */ (ol.style.PolygonDefaults.strokeColor));
|
||||||
|
}
|
||||||
|
|
||||||
strokeWidth = !goog.isDef(options.strokeWidth) ?
|
if (goog.isDefAndNotNull(options.strokeWidth)) {
|
||||||
new ol.expression.Literal(ol.style.PolygonDefaults.strokeWidth) :
|
strokeWidth = (options.strokeWidth instanceof ol.expression.Expression) ?
|
||||||
(options.strokeWidth instanceof ol.expression.Expression) ?
|
|
||||||
options.strokeWidth :
|
options.strokeWidth :
|
||||||
new ol.expression.Literal(options.strokeWidth);
|
new ol.expression.Literal(options.strokeWidth);
|
||||||
|
} else {
|
||||||
|
strokeWidth = new ol.expression.Literal(
|
||||||
|
/** @type {number} */ (ol.style.PolygonDefaults.strokeWidth));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -130,17 +130,24 @@ ol.style.Shape = function(options) {
|
|||||||
if (goog.isDefAndNotNull(options.strokeColor) ||
|
if (goog.isDefAndNotNull(options.strokeColor) ||
|
||||||
goog.isDefAndNotNull(options.strokeWidth)) {
|
goog.isDefAndNotNull(options.strokeWidth)) {
|
||||||
|
|
||||||
strokeColor = !goog.isDefAndNotNull(options.strokeColor) ?
|
if (goog.isDefAndNotNull(options.strokeColor)) {
|
||||||
new ol.expression.Literal(ol.style.ShapeDefaults.strokeColor) :
|
strokeColor = (options.strokeColor instanceof ol.expression.Expression) ?
|
||||||
(options.strokeColor instanceof ol.expression.Expression) ?
|
|
||||||
options.strokeColor :
|
options.strokeColor :
|
||||||
new ol.expression.Literal(options.strokeColor);
|
new ol.expression.Literal(options.strokeColor);
|
||||||
|
} else {
|
||||||
|
strokeColor = new ol.expression.Literal(
|
||||||
|
/** @type {string} */ (ol.style.ShapeDefaults.strokeColor));
|
||||||
|
}
|
||||||
|
|
||||||
strokeWidth = !goog.isDef(options.strokeWidth) ?
|
if (goog.isDefAndNotNull(options.strokeWidth)) {
|
||||||
new ol.expression.Literal(ol.style.ShapeDefaults.strokeWidth) :
|
strokeWidth = (options.strokeWidth instanceof ol.expression.Expression) ?
|
||||||
(options.strokeWidth instanceof ol.expression.Expression) ?
|
|
||||||
options.strokeWidth :
|
options.strokeWidth :
|
||||||
new ol.expression.Literal(options.strokeWidth);
|
new ol.expression.Literal(options.strokeWidth);
|
||||||
|
} else {
|
||||||
|
strokeWidth = new ol.expression.Literal(
|
||||||
|
/** @type {number} */ (ol.style.ShapeDefaults.strokeWidth));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -534,3 +534,4 @@ goog.require('ol.expression.Math');
|
|||||||
goog.require('ol.expression.Member');
|
goog.require('ol.expression.Member');
|
||||||
goog.require('ol.expression.Not');
|
goog.require('ol.expression.Not');
|
||||||
goog.require('ol.expression.TokenType');
|
goog.require('ol.expression.TokenType');
|
||||||
|
goog.require('ol.expression.UnexpectedToken');
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ describe('ol.expression.Lexer', function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe.only('#next()', function() {
|
describe('#next()', function() {
|
||||||
|
|
||||||
it('returns one token at a time', function() {
|
it('returns one token at a time', function() {
|
||||||
var source = 'foo === "bar"';
|
var source = 'foo === "bar"';
|
||||||
@@ -41,7 +41,7 @@ describe('ol.expression.Lexer', function() {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe.only('#peek()', function() {
|
describe('#peek()', function() {
|
||||||
|
|
||||||
var lexer;
|
var lexer;
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user