Simplify hit detection code
This commit is contained in:
@@ -135,12 +135,10 @@ ol.renderer.Map.prototype.forEachFeatureAtPixel =
|
||||
result = this.replayGroup.forEachGeometryAtPixel(extent, viewResolution,
|
||||
viewRotation, coordinate, {},
|
||||
/**
|
||||
* @param {ol.geom.Geometry} geometry Geometry.
|
||||
* @param {Object} data Data.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @return {?} Callback result.
|
||||
*/
|
||||
function(geometry, data) {
|
||||
var feature = /** @type {ol.Feature} */ (data);
|
||||
function(feature) {
|
||||
goog.asserts.assert(goog.isDef(feature));
|
||||
var key = goog.getUid(feature).toString();
|
||||
if (!(key in features)) {
|
||||
|
||||
Reference in New Issue
Block a user