Added image data value to 'forEachLayerAtPixel' method callback
The update has been added to the docs for all 'forEachLayerAtPixel' definitions and currently returns null for non-supporting definitions. ol.Color typeDef was also updated to support Uint8Arrays & Uint8ClampedArrays as it is the reference type for the addded argument #5586
This commit is contained in:
@@ -619,10 +619,11 @@ ol.Map.prototype.forEachFeatureAtPixel = function(pixel, callback, opt_this, opt
|
||||
* execute a callback with each matching layer. Layers included in the
|
||||
* detection can be configured through `opt_layerFilter`.
|
||||
* @param {ol.Pixel} pixel Pixel.
|
||||
* @param {function(this: S, ol.layer.Layer): T} callback Layer
|
||||
* callback. Will receive one argument, the {@link ol.layer.Layer layer}
|
||||
* that contains the color pixel. To stop detection, callback functions can
|
||||
* return a truthy value.
|
||||
* @param {function(this: S, ol.layer.Layer, ol.Color): T} callback Layer
|
||||
* callback. This callback will recieve two arguments: first is the
|
||||
* {@link ol.layer.Layer layer}, second argument is {@link ol.Color}
|
||||
* and will be null for layer types that do not currently support this
|
||||
* argument. To stop detection callback functions can return a truthy value.
|
||||
* @param {S=} opt_this Value to use as `this` when executing `callback`.
|
||||
* @param {(function(this: U, ol.layer.Layer): boolean)=} opt_layerFilter Layer
|
||||
* filter function. The filter function will receive one argument, the
|
||||
|
||||
Reference in New Issue
Block a user