From b390c1bdf8e244b7c2f17349920a3e2a45065f4e Mon Sep 17 00:00:00 2001 From: tsauerwein Date: Fri, 30 Jan 2015 10:05:38 +0100 Subject: [PATCH] Use `dragging` flag in examples --- examples/getfeatureinfo-image.js | 5 ++++- examples/getfeatureinfo-tile.js | 5 ++++- src/ol/map.js | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/examples/getfeatureinfo-image.js b/examples/getfeatureinfo-image.js index 5ec90dc8ca..316fda17bc 100644 --- a/examples/getfeatureinfo-image.js +++ b/examples/getfeatureinfo-image.js @@ -39,7 +39,10 @@ map.on('singleclick', function(evt) { } }); -$(map.getViewport()).on('mousemove', function(evt) { +map.on('pointermove', function(evt) { + if (evt.dragging) { + return; + } var pixel = map.getEventPixel(evt.originalEvent); var hit = map.forEachLayerAtPixel(pixel, function(layer) { return true; diff --git a/examples/getfeatureinfo-tile.js b/examples/getfeatureinfo-tile.js index 901b87db57..022606b611 100644 --- a/examples/getfeatureinfo-tile.js +++ b/examples/getfeatureinfo-tile.js @@ -39,7 +39,10 @@ map.on('singleclick', function(evt) { } }); -$(map.getViewport()).on('mousemove', function(evt) { +map.on('pointermove', function(evt) { + if (evt.dragging) { + return; + } var pixel = map.getEventPixel(evt.originalEvent); var hit = map.forEachLayerAtPixel(pixel, function(layer) { return true; diff --git a/src/ol/map.js b/src/ol/map.js index 9b019ed2eb..16620afb8b 100644 --- a/src/ol/map.js +++ b/src/ol/map.js @@ -590,7 +590,7 @@ ol.Map.prototype.forEachFeatureAtPixel = /** - * Detect layers that have a colour value at a pixel on the viewport, and + * Detect layers that have a color value at a pixel on the viewport, and * execute a callback with each matching layer. Layers included in the * detection can be configured through `opt_layerFilter`. Feature overlays will * always be included in the detection.