Remove use of goog.isDef

This commit is contained in:
Petr Sloup
2015-09-29 13:53:24 +02:00
parent 783acfa961
commit f3d5d16a82
2 changed files with 5 additions and 5 deletions

View File

@@ -46,11 +46,11 @@ ol.reproj.calculateSourceResolution = function(sourceProj, targetProj,
targetProj.getPointResolution(targetResolution, targetCenter);
var targetMPU = targetProj.getMetersPerUnit();
if (goog.isDef(targetMPU)) {
if (targetMPU !== undefined) {
sourceResolution *= targetMPU;
}
var sourceMPU = sourceProj.getMetersPerUnit();
if (goog.isDef(sourceMPU)) {
if (sourceMPU !== undefined) {
sourceResolution /= sourceMPU;
}

View File

@@ -45,7 +45,7 @@ ol.reproj.Tile = function(sourceProj, sourceTileGrid,
* @private
* @type {boolean}
*/
this.renderEdges_ = goog.isDef(opt_renderEdges) ? opt_renderEdges : false;
this.renderEdges_ = opt_renderEdges !== undefined ? opt_renderEdges : false;
/**
* @private
@@ -132,7 +132,7 @@ ol.reproj.Tile = function(sourceProj, sourceTileGrid,
return;
}
var errorThresholdInPixels = goog.isDef(opt_errorThreshold) ?
var errorThresholdInPixels = opt_errorThreshold !== undefined ?
opt_errorThreshold : ol.DEFAULT_RASTER_REPROJ_ERROR_THRESHOLD;
/**
@@ -219,7 +219,7 @@ ol.reproj.Tile.prototype.disposeInternal = function() {
* @inheritDoc
*/
ol.reproj.Tile.prototype.getImage = function(opt_context) {
if (goog.isDef(opt_context)) {
if (opt_context !== undefined) {
var image;
var key = goog.getUid(opt_context);
if (key in this.canvasByContext_) {