Replace goog.isDefAndNotNull() with truthy checks
This commit is contained in:
@@ -121,7 +121,7 @@ ol.interaction.DragAndDrop.prototype.handleResult_ = function(file, result) {
|
||||
for (j = 0, jj = readFeatures.length; j < jj; ++j) {
|
||||
var feature = readFeatures[j];
|
||||
var geometry = feature.getGeometry();
|
||||
if (goog.isDefAndNotNull(geometry)) {
|
||||
if (geometry) {
|
||||
geometry.applyTransform(transform);
|
||||
}
|
||||
features.push(feature);
|
||||
|
||||
@@ -147,7 +147,7 @@ ol.interaction.Interaction.rotate =
|
||||
*/
|
||||
ol.interaction.Interaction.rotateWithoutConstraints =
|
||||
function(map, view, rotation, opt_anchor, opt_duration) {
|
||||
if (goog.isDefAndNotNull(rotation)) {
|
||||
if (rotation !== undefined) {
|
||||
var currentRotation = view.getRotation();
|
||||
var currentCenter = view.getCenter();
|
||||
if (currentRotation !== undefined && currentCenter &&
|
||||
@@ -218,7 +218,7 @@ ol.interaction.Interaction.zoomByDelta =
|
||||
*/
|
||||
ol.interaction.Interaction.zoomWithoutConstraints =
|
||||
function(map, view, resolution, opt_anchor, opt_duration) {
|
||||
if (goog.isDefAndNotNull(resolution)) {
|
||||
if (resolution) {
|
||||
var currentResolution = view.getResolution();
|
||||
var currentCenter = view.getCenter();
|
||||
if (currentResolution !== undefined && currentCenter &&
|
||||
@@ -237,7 +237,7 @@ ol.interaction.Interaction.zoomWithoutConstraints =
|
||||
}));
|
||||
}
|
||||
}
|
||||
if (goog.isDefAndNotNull(opt_anchor)) {
|
||||
if (opt_anchor) {
|
||||
var center = view.calculateCenterZoom(resolution, opt_anchor);
|
||||
view.setCenter(center);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user