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
+6 -6
View File
@@ -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();