Order callback calls by distance to click position
All callback calls for hits with a tolerance > 0 are queued and called ordered by distance after all hits are detected.
This commit is contained in:
@@ -106,10 +106,19 @@ class LayerRenderer extends Observable {
|
||||
* @param {import("../PluggableMap.js").FrameState} frameState Frame state.
|
||||
* @param {number} hitTolerance Hit tolerance in pixels.
|
||||
* @param {import("./vector.js").FeatureCallback<T>} callback Feature callback.
|
||||
* @return {T|void} Callback result.
|
||||
* @param {Array<import("./Map.js").HitMatch<T>>} matches The hit detected matches with tolerance.
|
||||
* @return {T|undefined} Callback result.
|
||||
* @template T
|
||||
*/
|
||||
forEachFeatureAtCoordinate(coordinate, frameState, hitTolerance, callback) {}
|
||||
forEachFeatureAtCoordinate(
|
||||
coordinate,
|
||||
frameState,
|
||||
hitTolerance,
|
||||
callback,
|
||||
matches
|
||||
) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* @abstract
|
||||
|
||||
Reference in New Issue
Block a user