Inline goog.isDef() calls for properties
This commit is contained in:
@@ -45,7 +45,7 @@ ol.source.ImageWMS = function(opt_options) {
|
||||
* @type {?string}
|
||||
*/
|
||||
this.crossOrigin_ =
|
||||
goog.isDef(options.crossOrigin) ? options.crossOrigin : null;
|
||||
options.crossOrigin !== undefined ? options.crossOrigin : null;
|
||||
|
||||
/**
|
||||
* @private
|
||||
@@ -57,7 +57,7 @@ ol.source.ImageWMS = function(opt_options) {
|
||||
* @private
|
||||
* @type {ol.ImageLoadFunctionType}
|
||||
*/
|
||||
this.imageLoadFunction_ = goog.isDef(options.imageLoadFunction) ?
|
||||
this.imageLoadFunction_ = options.imageLoadFunction !== undefined ?
|
||||
options.imageLoadFunction : ol.source.Image.defaultImageLoadFunction;
|
||||
|
||||
/**
|
||||
@@ -84,7 +84,7 @@ ol.source.ImageWMS = function(opt_options) {
|
||||
* @private
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.hidpi_ = goog.isDef(options.hidpi) ? options.hidpi : true;
|
||||
this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;
|
||||
|
||||
/**
|
||||
* @private
|
||||
@@ -108,7 +108,7 @@ ol.source.ImageWMS = function(opt_options) {
|
||||
* @private
|
||||
* @type {number}
|
||||
*/
|
||||
this.ratio_ = goog.isDef(options.ratio) ? options.ratio : 1.5;
|
||||
this.ratio_ = options.ratio !== undefined ? options.ratio : 1.5;
|
||||
|
||||
};
|
||||
goog.inherits(ol.source.ImageWMS, ol.source.Image);
|
||||
@@ -281,7 +281,7 @@ ol.source.ImageWMS.prototype.getImageLoadFunction = function() {
|
||||
ol.source.ImageWMS.prototype.getRequestUrl_ =
|
||||
function(extent, size, pixelRatio, projection, params) {
|
||||
|
||||
goog.asserts.assert(goog.isDef(this.url_), 'url is defined');
|
||||
goog.asserts.assert(this.url_ !== undefined, 'url is defined');
|
||||
|
||||
params[this.v13_ ? 'CRS' : 'SRS'] = projection.getCode();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user