Use dragging flag in examples
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user