From 67c2e46c19d54012d8b60562d25cc255b9bf03e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Mon, 30 Jun 2014 09:07:16 +0200 Subject: [PATCH] Add ol.events.condition.mouseMove --- src/ol/events/condition.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ol/events/condition.js b/src/ol/events/condition.js index a1c61faf7d..7162bd0639 100644 --- a/src/ol/events/condition.js +++ b/src/ol/events/condition.js @@ -55,6 +55,16 @@ ol.events.condition.altShiftKeysOnly = function(mapBrowserEvent) { ol.events.condition.always = goog.functions.TRUE; +/** + * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event. + * @return {boolean} True if the browser event is a `mousemove` event. + * @todo api + */ +ol.events.condition.mouseMove = function(mapBrowserEvent) { + return mapBrowserEvent.originalEvent.type == 'mousemove'; +}; + + /** * Always false. * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.