Use goog.functions.identity where it makes sense
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
goog.provide('ol.interaction.DragRotateAndZoom');
|
||||
|
||||
goog.require('goog.asserts');
|
||||
goog.require('goog.functions');
|
||||
goog.require('goog.math.Vec2');
|
||||
goog.require('ol.ViewHint');
|
||||
goog.require('ol.events.ConditionType');
|
||||
@@ -153,11 +154,8 @@ ol.interaction.DragRotateAndZoom.prototype.handlePointerDown =
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Stop the event if it was handled, so that interaction `DragZoom`
|
||||
* does not interfere.
|
||||
*/
|
||||
ol.interaction.DragRotateAndZoom.prototype.shouldStopEvent =
|
||||
function(hasHandledEvent) {
|
||||
/* Stop the event if it was handled, so that interaction `DragZoom`
|
||||
* does not interfere.
|
||||
*/
|
||||
return hasHandledEvent;
|
||||
};
|
||||
goog.functions.identity;
|
||||
|
||||
@@ -735,9 +735,7 @@ ol.interaction.Modify.prototype.removeVertex_ = function() {
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.interaction.Modify.prototype.shouldStopEvent = function(handled) {
|
||||
return handled;
|
||||
};
|
||||
ol.interaction.Modify.prototype.shouldStopEvent = goog.functions.identity;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user