Inline goog.isDef() calls for properties
This commit is contained in:
@@ -27,7 +27,7 @@ ol.style.Stroke = function(opt_options) {
|
||||
* @private
|
||||
* @type {ol.Color|string}
|
||||
*/
|
||||
this.color_ = goog.isDef(options.color) ? options.color : null;
|
||||
this.color_ = options.color !== undefined ? options.color : null;
|
||||
|
||||
/**
|
||||
* @private
|
||||
@@ -39,7 +39,7 @@ ol.style.Stroke = function(opt_options) {
|
||||
* @private
|
||||
* @type {Array.<number>}
|
||||
*/
|
||||
this.lineDash_ = goog.isDef(options.lineDash) ? options.lineDash : null;
|
||||
this.lineDash_ = options.lineDash !== undefined ? options.lineDash : null;
|
||||
|
||||
/**
|
||||
* @private
|
||||
@@ -207,15 +207,15 @@ ol.style.Stroke.prototype.getChecksum = function() {
|
||||
var raw = 's' +
|
||||
(!goog.isNull(this.color_) ?
|
||||
ol.color.asString(this.color_) : '-') + ',' +
|
||||
(goog.isDef(this.lineCap_) ?
|
||||
(this.lineCap_ !== undefined ?
|
||||
this.lineCap_.toString() : '-') + ',' +
|
||||
(!goog.isNull(this.lineDash_) ?
|
||||
this.lineDash_.toString() : '-') + ',' +
|
||||
(goog.isDef(this.lineJoin_) ?
|
||||
(this.lineJoin_ !== undefined ?
|
||||
this.lineJoin_ : '-') + ',' +
|
||||
(goog.isDef(this.miterLimit_) ?
|
||||
(this.miterLimit_ !== undefined ?
|
||||
this.miterLimit_.toString() : '-') + ',' +
|
||||
(goog.isDef(this.width_) ?
|
||||
(this.width_ !== undefined ?
|
||||
this.width_.toString() : '-');
|
||||
|
||||
var md5 = new goog.crypt.Md5();
|
||||
|
||||
Reference in New Issue
Block a user