diff --git a/src/ol/interaction/modify.js b/src/ol/interaction/modify.js index 755c16af9c..2dff8c540f 100644 --- a/src/ol/interaction/modify.js +++ b/src/ol/interaction/modify.js @@ -700,11 +700,9 @@ ol.interaction.Modify.prototype.handlePointerAtPixel_ = function(pixel, map) { ol.coordinate.squaredDistanceToSegment(pixelCoordinate, b.segment); }; - var lowerLeft = map.getCoordinateFromPixel( - [pixel[0] - this.pixelTolerance_, pixel[1] + this.pixelTolerance_]); - var upperRight = map.getCoordinateFromPixel( - [pixel[0] + this.pixelTolerance_, pixel[1] - this.pixelTolerance_]); - var box = ol.extent.boundingExtent([lowerLeft, upperRight]); + var box = ol.extent.buffer( + ol.extent.createOrUpdateFromCoordinate(pixelCoordinate), + map.getView().getResolution() * this.pixelTolerance_); var rBush = this.rBush_; var nodes = rBush.getInExtent(box);