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
+3 -3
View File
@@ -28,10 +28,10 @@ goog.require('ol.source.TileImage');
* @api stable
*/
ol.source.XYZ = function(options) {
var projection = goog.isDef(options.projection) ?
var projection = options.projection !== undefined ?
options.projection : 'EPSG:3857';
var tileGrid = goog.isDef(options.tileGrid) ? options.tileGrid :
var tileGrid = options.tileGrid !== undefined ? options.tileGrid :
ol.tilegrid.createXYZ({
extent: ol.tilegrid.extentFromProjection(projection),
maxZoom: options.maxZoom,
@@ -53,7 +53,7 @@ ol.source.XYZ = function(options) {
tileLoadFunction: options.tileLoadFunction,
tilePixelRatio: options.tilePixelRatio,
tileUrlFunction: ol.TileUrlFunction.nullTileUrlFunction,
wrapX: goog.isDef(options.wrapX) ? options.wrapX : true
wrapX: options.wrapX !== undefined ? options.wrapX : true
});
if (options.tileUrlFunction !== undefined) {