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
@@ -99,27 +99,27 @@ ol.proj.Projection = function(options) {
* @private
* @type {ol.Extent}
*/
this.extent_ = goog.isDef(options.extent) ? options.extent : null;
this.extent_ = options.extent !== undefined ? options.extent : null;
/**
* @private
* @type {ol.Extent}
*/
this.worldExtent_ = goog.isDef(options.worldExtent) ?
this.worldExtent_ = options.worldExtent !== undefined ?
options.worldExtent : null;
/**
* @private
* @type {string}
*/
this.axisOrientation_ = goog.isDef(options.axisOrientation) ?
this.axisOrientation_ = options.axisOrientation !== undefined ?
options.axisOrientation : 'enu';
/**
* @private
* @type {boolean}
*/
this.global_ = goog.isDef(options.global) ? options.global : false;
this.global_ = options.global !== undefined ? options.global : false;
/**
@@ -132,7 +132,7 @@ ol.proj.Projection = function(options) {
* @private
* @type {function(number, ol.Coordinate):number}
*/
this.getPointResolutionFunc_ = goog.isDef(options.getPointResolution) ?
this.getPointResolutionFunc_ = options.getPointResolution !== undefined ?
options.getPointResolution : this.getPointResolution_;
/**
@@ -149,7 +149,7 @@ ol.proj.Projection = function(options) {
!goog.isDef(projections[code])) {
var def = proj4.defs(code);
if (def !== undefined) {
if (goog.isDef(def.axis) && options.axisOrientation === undefined) {
if (def.axis !== undefined && options.axisOrientation === undefined) {
this.axisOrientation_ = def.axis;
}
if (options.units === undefined) {