Added hitTolerance parameter to reworked files

This commit is contained in:
simonseyock
2016-12-08 10:21:57 +01:00
parent f10ae6c474
commit f28e0ebc1f
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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.
+1 -1
View File
@@ -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);