From ce0b1d2a470fa100d49eda481b85f03e9a0b784d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Mon, 7 Apr 2014 16:59:04 +0200 Subject: [PATCH] Use goog.functions.identity where it makes sense --- src/ol/interaction/dragrotateandzoominteraction.js | 10 ++++------ src/ol/interaction/modifyinteraction.js | 4 +--- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/ol/interaction/dragrotateandzoominteraction.js b/src/ol/interaction/dragrotateandzoominteraction.js index 79cdd29d69..80b689dfa4 100644 --- a/src/ol/interaction/dragrotateandzoominteraction.js +++ b/src/ol/interaction/dragrotateandzoominteraction.js @@ -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; diff --git a/src/ol/interaction/modifyinteraction.js b/src/ol/interaction/modifyinteraction.js index 75979b419e..e057693b7c 100644 --- a/src/ol/interaction/modifyinteraction.js +++ b/src/ol/interaction/modifyinteraction.js @@ -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; /**