Added hitTolerance parameter to reworked files
This commit is contained in:
@@ -98,14 +98,14 @@ ol.renderer.canvas.IntermediateCanvas.prototype.getImageTransform = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.canvas.IntermediateCanvas.prototype.forEachFeatureAtCoordinate = function(coordinate, frameState, callback, thisArg) {
|
ol.renderer.canvas.IntermediateCanvas.prototype.forEachFeatureAtCoordinate = function(coordinate, frameState, hitTolerance, callback, thisArg) {
|
||||||
var layer = this.getLayer();
|
var layer = this.getLayer();
|
||||||
var source = layer.getSource();
|
var source = layer.getSource();
|
||||||
var resolution = frameState.viewState.resolution;
|
var resolution = frameState.viewState.resolution;
|
||||||
var rotation = frameState.viewState.rotation;
|
var rotation = frameState.viewState.rotation;
|
||||||
var skippedFeatureUids = frameState.skippedFeatureUids;
|
var skippedFeatureUids = frameState.skippedFeatureUids;
|
||||||
return source.forEachFeatureAtCoordinate(
|
return source.forEachFeatureAtCoordinate(
|
||||||
coordinate, resolution, rotation, skippedFeatureUids,
|
coordinate, resolution, rotation, hitTolerance, skippedFeatureUids,
|
||||||
/**
|
/**
|
||||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||||
* @return {?} Callback result.
|
* @return {?} Callback result.
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ ol.renderer.canvas.Layer.prototype.dispatchComposeEvent_ = function(type, contex
|
|||||||
*/
|
*/
|
||||||
ol.renderer.canvas.Layer.prototype.forEachLayerAtCoordinate = function(coordinate, frameState, callback, thisArg) {
|
ol.renderer.canvas.Layer.prototype.forEachLayerAtCoordinate = function(coordinate, frameState, callback, thisArg) {
|
||||||
var hasFeature = this.forEachFeatureAtCoordinate(
|
var hasFeature = this.forEachFeatureAtCoordinate(
|
||||||
coordinate, frameState, ol.functions.TRUE, this);
|
coordinate, frameState, 0, ol.functions.TRUE, this);
|
||||||
|
|
||||||
if (hasFeature) {
|
if (hasFeature) {
|
||||||
return callback.call(thisArg, this.getLayer(), null);
|
return callback.call(thisArg, this.getLayer(), null);
|
||||||
|
|||||||
Reference in New Issue
Block a user