Inline goog.isDef() calls for properties

This commit is contained in:
Tim Schaub
2015-09-27 10:40:20 -06:00
parent 36e336f406
commit 83c59ee255
44 changed files with 200 additions and 198 deletions

View File

@@ -32,7 +32,7 @@ ol.source.TileImage = function(options) {
logo: options.logo,
opaque: options.opaque,
projection: options.projection,
state: goog.isDef(options.state) ?
state: options.state !== undefined ?
/** @type {ol.source.State} */ (options.state) : undefined,
tileGrid: options.tileGrid,
tilePixelRatio: options.tilePixelRatio,
@@ -43,7 +43,7 @@ ol.source.TileImage = function(options) {
* @protected
* @type {ol.TileUrlFunctionType}
*/
this.tileUrlFunction = goog.isDef(options.tileUrlFunction) ?
this.tileUrlFunction = options.tileUrlFunction !== undefined ?
options.tileUrlFunction :
ol.TileUrlFunction.nullTileUrlFunction;
@@ -52,13 +52,13 @@ ol.source.TileImage = function(options) {
* @type {?string}
*/
this.crossOrigin =
goog.isDef(options.crossOrigin) ? options.crossOrigin : null;
options.crossOrigin !== undefined ? options.crossOrigin : null;
/**
* @protected
* @type {ol.TileLoadFunctionType}
*/
this.tileLoadFunction = goog.isDef(options.tileLoadFunction) ?
this.tileLoadFunction = options.tileLoadFunction !== undefined ?
options.tileLoadFunction : ol.source.TileImage.defaultTileLoadFunction;
/**
@@ -66,7 +66,7 @@ ol.source.TileImage = function(options) {
* @type {function(new: ol.ImageTile, ol.TileCoord, ol.TileState, string,
* ?string, ol.TileLoadFunctionType)}
*/
this.tileClass = goog.isDef(options.tileClass) ?
this.tileClass = options.tileClass !== undefined ?
options.tileClass : ol.ImageTile;
};