Merge pull request #4176 from tschaub/remove-isdefandnotnull

Remove use of goog.isDefAndNotNull().
This commit is contained in:
Tim Schaub
2015-10-01 00:05:57 -06:00
45 changed files with 116 additions and 135 deletions

View File

@@ -114,11 +114,9 @@ ol.control.FullScreen.prototype.handleFullScreen_ = function() {
goog.dom.fullscreen.exitFullScreen();
} else {
var target = map.getTarget();
goog.asserts.assert(goog.isDefAndNotNull(target),
'target should be defined');
goog.asserts.assert(target, 'target should be defined');
var element = goog.dom.getElement(target);
goog.asserts.assert(goog.isDefAndNotNull(element),
'element should be defined');
goog.asserts.assert(element, 'element should be defined');
if (this.keys_) {
goog.dom.fullscreen.requestFullScreenWithKeys(element);
} else {

View File

@@ -395,7 +395,7 @@ ol.control.OverviewMap.prototype.updateBox_ = function() {
overlay.setPosition(rotateBottomLeft);
// set box size calculated from map extent size and overview map resolution
if (goog.isDefAndNotNull(box)) {
if (box) {
var boxWidth = Math.abs((bottomLeft[0] - topRight[0]) / ovresolution);
var boxHeight = Math.abs((topRight[1] - bottomLeft[1]) / ovresolution);
goog.style.setBorderBoxSize(box, new goog.math.Size(

View File

@@ -182,7 +182,7 @@ ol.control.ZoomSlider.render = function(mapEvent) {
if (goog.isNull(mapEvent.frameState)) {
return;
}
goog.asserts.assert(goog.isDefAndNotNull(mapEvent.frameState.viewState),
goog.asserts.assert(mapEvent.frameState.viewState,
'viewState should be defined');
if (!this.sliderInitialized_) {
this.initSlider_();