Named exports from ol/functions
This commit is contained in:
@@ -8,7 +8,7 @@ import _ol_TileState_ from '../TileState.js';
|
||||
import _ol_asserts_ from '../asserts.js';
|
||||
import _ol_events_ from '../events.js';
|
||||
import _ol_events_EventType_ from '../events/EventType.js';
|
||||
import _ol_functions_ from '../functions.js';
|
||||
import {FALSE} from '../functions.js';
|
||||
import _ol_source_State_ from '../source/State.js';
|
||||
|
||||
/**
|
||||
@@ -51,7 +51,7 @@ _ol_renderer_Layer_.prototype.forEachFeatureAtCoordinate = nullFunction;
|
||||
* @param {olx.FrameState} frameState Frame state.
|
||||
* @return {boolean} Is there a feature at the given coordinate?
|
||||
*/
|
||||
_ol_renderer_Layer_.prototype.hasFeatureAtCoordinate = _ol_functions_.FALSE;
|
||||
_ol_renderer_Layer_.prototype.hasFeatureAtCoordinate = FALSE;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,7 +6,7 @@ import _ol_Disposable_ from '../Disposable.js';
|
||||
import _ol_events_ from '../events.js';
|
||||
import _ol_events_EventType_ from '../events/EventType.js';
|
||||
import {getWidth} from '../extent.js';
|
||||
import _ol_functions_ from '../functions.js';
|
||||
import {TRUE} from '../functions.js';
|
||||
import _ol_layer_Layer_ from '../layer/Layer.js';
|
||||
import _ol_plugins_ from '../plugins.js';
|
||||
import _ol_style_ from '../style.js';
|
||||
@@ -192,7 +192,7 @@ _ol_renderer_Map_.prototype.forEachLayerAtPixel = function(pixel, frameState, ca
|
||||
*/
|
||||
_ol_renderer_Map_.prototype.hasFeatureAtCoordinate = function(coordinate, frameState, hitTolerance, layerFilter, thisArg) {
|
||||
var hasFeature = this.forEachFeatureAtCoordinate(
|
||||
coordinate, frameState, hitTolerance, _ol_functions_.TRUE, this, layerFilter, thisArg);
|
||||
coordinate, frameState, hitTolerance, TRUE, this, layerFilter, thisArg);
|
||||
|
||||
return hasFeature !== undefined;
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
import {inherits} from '../../index.js';
|
||||
import {getBottomLeft, getBottomRight, getTopLeft, getTopRight} from '../../extent.js';
|
||||
import _ol_functions_ from '../../functions.js';
|
||||
import {TRUE} from '../../functions.js';
|
||||
import _ol_render_Event_ from '../../render/Event.js';
|
||||
import _ol_render_EventType_ from '../../render/EventType.js';
|
||||
import _ol_render_canvas_ from '../../render/canvas.js';
|
||||
@@ -108,8 +108,7 @@ _ol_renderer_canvas_Layer_.prototype.dispatchComposeEvent_ = function(type, cont
|
||||
* @template S,T,U
|
||||
*/
|
||||
_ol_renderer_canvas_Layer_.prototype.forEachLayerAtCoordinate = function(coordinate, frameState, callback, thisArg) {
|
||||
var hasFeature = this.forEachFeatureAtCoordinate(
|
||||
coordinate, frameState, 0, _ol_functions_.TRUE, this);
|
||||
var hasFeature = this.forEachFeatureAtCoordinate(coordinate, frameState, 0, TRUE, this);
|
||||
|
||||
if (hasFeature) {
|
||||
return callback.call(thisArg, this.getLayer(), null);
|
||||
|
||||
@@ -7,7 +7,7 @@ import _ol_LayerType_ from '../../LayerType.js';
|
||||
import _ol_ViewHint_ from '../../ViewHint.js';
|
||||
import {createCanvasContext2D} from '../../dom.js';
|
||||
import {getIntersection, isEmpty} from '../../extent.js';
|
||||
import _ol_functions_ from '../../functions.js';
|
||||
import {TRUE} from '../../functions.js';
|
||||
import _ol_renderer_Type_ from '../Type.js';
|
||||
import _ol_renderer_webgl_Layer_ from '../webgl/Layer.js';
|
||||
import _ol_transform_ from '../../transform.js';
|
||||
@@ -234,8 +234,7 @@ _ol_renderer_webgl_ImageLayer_.prototype.updateProjectionMatrix_ = function(canv
|
||||
* @inheritDoc
|
||||
*/
|
||||
_ol_renderer_webgl_ImageLayer_.prototype.hasFeatureAtCoordinate = function(coordinate, frameState) {
|
||||
var hasFeature = this.forEachFeatureAtCoordinate(
|
||||
coordinate, frameState, 0, _ol_functions_.TRUE, this);
|
||||
var hasFeature = this.forEachFeatureAtCoordinate(coordinate, frameState, 0, TRUE, this);
|
||||
return hasFeature !== undefined;
|
||||
};
|
||||
|
||||
@@ -253,8 +252,7 @@ _ol_renderer_webgl_ImageLayer_.prototype.forEachLayerAtPixel = function(pixel, f
|
||||
// so that for example also transparent polygons are detected
|
||||
var coordinate = _ol_transform_.apply(
|
||||
frameState.pixelToCoordinateTransform, pixel.slice());
|
||||
var hasFeature = this.forEachFeatureAtCoordinate(
|
||||
coordinate, frameState, 0, _ol_functions_.TRUE, this);
|
||||
var hasFeature = this.forEachFeatureAtCoordinate(coordinate, frameState, 0, TRUE, this);
|
||||
|
||||
if (hasFeature) {
|
||||
return callback.call(thisArg, this.getLayer(), null);
|
||||
|
||||
Reference in New Issue
Block a user