Named exports from ol/functions

This commit is contained in:
Frederic Junod
2017-12-15 13:44:32 +01:00
parent 75ea4d3e9a
commit 2498bba90a
21 changed files with 52 additions and 60 deletions

View File

@@ -21,7 +21,7 @@ import _ol_events_ from './events.js';
import _ol_events_Event_ from './events/Event.js'; import _ol_events_Event_ from './events/Event.js';
import _ol_events_EventType_ from './events/EventType.js'; import _ol_events_EventType_ from './events/EventType.js';
import {createEmpty, clone, createOrUpdateEmpty, equals, getForViewAndSize, isEmpty} from './extent.js'; import {createEmpty, clone, createOrUpdateEmpty, equals, getForViewAndSize, isEmpty} from './extent.js';
import _ol_functions_ from './functions.js'; import {TRUE} from './functions.js';
import _ol_has_ from './has.js'; import _ol_has_ from './has.js';
import _ol_layer_Group_ from './layer/Group.js'; import _ol_layer_Group_ from './layer/Group.js';
import _ol_obj_ from './obj.js'; import _ol_obj_ from './obj.js';
@@ -475,7 +475,7 @@ _ol_PluggableMap_.prototype.forEachFeatureAtPixel = function(pixel, callback, op
var hitTolerance = opt_options.hitTolerance !== undefined ? var hitTolerance = opt_options.hitTolerance !== undefined ?
opt_options.hitTolerance * this.frameState_.pixelRatio : 0; opt_options.hitTolerance * this.frameState_.pixelRatio : 0;
var layerFilter = opt_options.layerFilter !== undefined ? var layerFilter = opt_options.layerFilter !== undefined ?
opt_options.layerFilter : _ol_functions_.TRUE; opt_options.layerFilter : TRUE;
return this.renderer_.forEachFeatureAtCoordinate( return this.renderer_.forEachFeatureAtCoordinate(
coordinate, this.frameState_, hitTolerance, callback, null, coordinate, this.frameState_, hitTolerance, callback, null,
layerFilter, null); layerFilter, null);
@@ -530,8 +530,7 @@ _ol_PluggableMap_.prototype.forEachLayerAtPixel = function(pixel, callback, opt_
return; return;
} }
var thisArg = opt_this !== undefined ? opt_this : null; var thisArg = opt_this !== undefined ? opt_this : null;
var layerFilter = opt_layerFilter !== undefined ? var layerFilter = opt_layerFilter !== undefined ? opt_layerFilter : TRUE;
opt_layerFilter : _ol_functions_.TRUE;
var thisArg2 = opt_this2 !== undefined ? opt_this2 : null; var thisArg2 = opt_this2 !== undefined ? opt_this2 : null;
return this.renderer_.forEachLayerAtPixel( return this.renderer_.forEachLayerAtPixel(
pixel, this.frameState_, callback, thisArg, pixel, this.frameState_, callback, thisArg,
@@ -554,8 +553,7 @@ _ol_PluggableMap_.prototype.hasFeatureAtPixel = function(pixel, opt_options) {
} }
var coordinate = this.getCoordinateFromPixel(pixel); var coordinate = this.getCoordinateFromPixel(pixel);
opt_options = opt_options !== undefined ? opt_options : {}; opt_options = opt_options !== undefined ? opt_options : {};
var layerFilter = opt_options.layerFilter !== undefined ? var layerFilter = opt_options.layerFilter !== undefined ? opt_options.layerFilter : TRUE;
opt_options.layerFilter : _ol_functions_.TRUE;
var hitTolerance = opt_options.hitTolerance !== undefined ? var hitTolerance = opt_options.hitTolerance !== undefined ?
opt_options.hitTolerance * this.frameState_.pixelRatio : 0; opt_options.hitTolerance * this.frameState_.pixelRatio : 0;
return this.renderer_.hasFeatureAtCoordinate( return this.renderer_.hasFeatureAtCoordinate(

View File

@@ -3,7 +3,7 @@
*/ */
import _ol_MapBrowserEventType_ from '../MapBrowserEventType.js'; import _ol_MapBrowserEventType_ from '../MapBrowserEventType.js';
import _ol_asserts_ from '../asserts.js'; import _ol_asserts_ from '../asserts.js';
import _ol_functions_ from '../functions.js'; import {TRUE, FALSE} from '../functions.js';
import _ol_has_ from '../has.js'; import _ol_has_ from '../has.js';
var _ol_events_condition_ = {}; var _ol_events_condition_ = {};
@@ -50,7 +50,7 @@ _ol_events_condition_.altShiftKeysOnly = function(mapBrowserEvent) {
* @function * @function
* @api * @api
*/ */
_ol_events_condition_.always = _ol_functions_.TRUE; _ol_events_condition_.always = TRUE;
/** /**
@@ -89,7 +89,7 @@ _ol_events_condition_.mouseActionButton = function(mapBrowserEvent) {
* @function * @function
* @api * @api
*/ */
_ol_events_condition_.never = _ol_functions_.FALSE; _ol_events_condition_.never = FALSE;
/** /**

View File

@@ -1,21 +1,19 @@
/** /**
* @module ol/functions * @module ol/functions
*/ */
var _ol_functions_ = {};
/** /**
* Always returns true. * Always returns true.
* @returns {boolean} true. * @returns {boolean} true.
*/ */
_ol_functions_.TRUE = function() { export function TRUE() {
return true; return true;
}; }
/** /**
* Always returns false. * Always returns false.
* @returns {boolean} false. * @returns {boolean} false.
*/ */
_ol_functions_.FALSE = function() { export function FALSE() {
return false; return false;
}; }
export default _ol_functions_;

View File

@@ -4,7 +4,7 @@
import {inherits} from '../index.js'; import {inherits} from '../index.js';
import _ol_Object_ from '../Object.js'; import _ol_Object_ from '../Object.js';
import {createEmpty, getHeight, returnOrUpdate} from '../extent.js'; import {createEmpty, getHeight, returnOrUpdate} from '../extent.js';
import _ol_functions_ from '../functions.js'; import {FALSE} from '../functions.js';
import _ol_geom_flat_transform_ from '../geom/flat/transform.js'; import _ol_geom_flat_transform_ from '../geom/flat/transform.js';
import {get as getProjection, getTransform} from '../proj.js'; import {get as getProjection, getTransform} from '../proj.js';
import _ol_proj_Units_ from '../proj/Units.js'; import _ol_proj_Units_ from '../proj/Units.js';
@@ -129,7 +129,7 @@ Geometry.prototype.computeExtent = function(extent) {};
* @param {number} y Y. * @param {number} y Y.
* @return {boolean} Contains (x, y). * @return {boolean} Contains (x, y).
*/ */
Geometry.prototype.containsXY = _ol_functions_.FALSE; Geometry.prototype.containsXY = FALSE;
/** /**

View File

@@ -2,7 +2,7 @@
* @module ol/geom/SimpleGeometry * @module ol/geom/SimpleGeometry
*/ */
import {inherits} from '../index.js'; import {inherits} from '../index.js';
import _ol_functions_ from '../functions.js'; import {FALSE} from '../functions.js';
import {createOrUpdateFromFlatCoordinates, getCenter} from '../extent.js'; import {createOrUpdateFromFlatCoordinates, getCenter} from '../extent.js';
import Geometry from '../geom/Geometry.js'; import Geometry from '../geom/Geometry.js';
import GeometryLayout from '../geom/GeometryLayout.js'; import GeometryLayout from '../geom/GeometryLayout.js';
@@ -84,7 +84,7 @@ SimpleGeometry.getStrideForLayout = function(layout) {
/** /**
* @inheritDoc * @inheritDoc
*/ */
SimpleGeometry.prototype.containsXY = _ol_functions_.FALSE; SimpleGeometry.prototype.containsXY = FALSE;
/** /**

View File

@@ -4,7 +4,7 @@
// FIXME should handle all geo-referenced data, not just vector data // FIXME should handle all geo-referenced data, not just vector data
import {inherits} from '../index.js'; import {inherits} from '../index.js';
import _ol_functions_ from '../functions.js'; import {TRUE} from '../functions.js';
import _ol_events_ from '../events.js'; import _ol_events_ from '../events.js';
import _ol_events_Event_ from '../events/Event.js'; import _ol_events_Event_ from '../events/Event.js';
import _ol_events_EventType_ from '../events/EventType.js'; import _ol_events_EventType_ from '../events/EventType.js';
@@ -148,7 +148,7 @@ _ol_interaction_DragAndDrop_.prototype.handleResult_ = function(file, event) {
* @this {ol.interaction.DragAndDrop} * @this {ol.interaction.DragAndDrop}
* @api * @api
*/ */
_ol_interaction_DragAndDrop_.handleEvent = _ol_functions_.TRUE; _ol_interaction_DragAndDrop_.handleEvent = TRUE;
/** /**

View File

@@ -6,7 +6,7 @@ import _ol_ViewHint_ from '../ViewHint.js';
import _ol_coordinate_ from '../coordinate.js'; import _ol_coordinate_ from '../coordinate.js';
import {easeOut} from '../easing.js'; import {easeOut} from '../easing.js';
import _ol_events_condition_ from '../events/condition.js'; import _ol_events_condition_ from '../events/condition.js';
import _ol_functions_ from '../functions.js'; import {FALSE} from '../functions.js';
import _ol_interaction_Pointer_ from '../interaction/Pointer.js'; import _ol_interaction_Pointer_ from '../interaction/Pointer.js';
/** /**
@@ -171,5 +171,5 @@ _ol_interaction_DragPan_.handleDownEvent_ = function(mapBrowserEvent) {
/** /**
* @inheritDoc * @inheritDoc
*/ */
_ol_interaction_DragPan_.prototype.shouldStopEvent = _ol_functions_.FALSE; _ol_interaction_DragPan_.prototype.shouldStopEvent = FALSE;
export default _ol_interaction_DragPan_; export default _ol_interaction_DragPan_;

View File

@@ -5,7 +5,7 @@ import {inherits} from '../index.js';
import _ol_RotationConstraint_ from '../RotationConstraint.js'; import _ol_RotationConstraint_ from '../RotationConstraint.js';
import _ol_ViewHint_ from '../ViewHint.js'; import _ol_ViewHint_ from '../ViewHint.js';
import _ol_events_condition_ from '../events/condition.js'; import _ol_events_condition_ from '../events/condition.js';
import _ol_functions_ from '../functions.js'; import {FALSE} from '../functions.js';
import _ol_interaction_Interaction_ from '../interaction/Interaction.js'; import _ol_interaction_Interaction_ from '../interaction/Interaction.js';
import _ol_interaction_Pointer_ from '../interaction/Pointer.js'; import _ol_interaction_Pointer_ from '../interaction/Pointer.js';
@@ -131,5 +131,5 @@ _ol_interaction_DragRotate_.handleDownEvent_ = function(mapBrowserEvent) {
/** /**
* @inheritDoc * @inheritDoc
*/ */
_ol_interaction_DragRotate_.prototype.shouldStopEvent = _ol_functions_.FALSE; _ol_interaction_DragRotate_.prototype.shouldStopEvent = FALSE;
export default _ol_interaction_DragRotate_; export default _ol_interaction_DragRotate_;

View File

@@ -10,7 +10,7 @@ import _ol_events_ from '../events.js';
import _ol_events_Event_ from '../events/Event.js'; import _ol_events_Event_ from '../events/Event.js';
import _ol_events_condition_ from '../events/condition.js'; import _ol_events_condition_ from '../events/condition.js';
import {boundingExtent, getBottomLeft, getBottomRight, getTopLeft, getTopRight} from '../extent.js'; import {boundingExtent, getBottomLeft, getBottomRight, getTopLeft, getTopRight} from '../extent.js';
import _ol_functions_ from '../functions.js'; import {TRUE, FALSE} from '../functions.js';
import Circle from '../geom/Circle.js'; import Circle from '../geom/Circle.js';
import GeometryType from '../geom/GeometryType.js'; import GeometryType from '../geom/GeometryType.js';
import LineString from '../geom/LineString.js'; import LineString from '../geom/LineString.js';
@@ -129,7 +129,7 @@ var _ol_interaction_Draw_ = function(options) {
* @private * @private
* @type {ol.EventsConditionType} * @type {ol.EventsConditionType}
*/ */
this.finishCondition_ = options.finishCondition ? options.finishCondition : _ol_functions_.TRUE; this.finishCondition_ = options.finishCondition ? options.finishCondition : TRUE;
var geometryFunction = options.geometryFunction; var geometryFunction = options.geometryFunction;
if (!geometryFunction) { if (!geometryFunction) {
@@ -735,7 +735,7 @@ _ol_interaction_Draw_.prototype.extend = function(feature) {
/** /**
* @inheritDoc * @inheritDoc
*/ */
_ol_interaction_Draw_.prototype.shouldStopEvent = _ol_functions_.FALSE; _ol_interaction_Draw_.prototype.shouldStopEvent = FALSE;
/** /**

View File

@@ -3,7 +3,7 @@
*/ */
import {inherits} from '../index.js'; import {inherits} from '../index.js';
import _ol_ViewHint_ from '../ViewHint.js'; import _ol_ViewHint_ from '../ViewHint.js';
import _ol_functions_ from '../functions.js'; import {FALSE} from '../functions.js';
import _ol_interaction_Interaction_ from '../interaction/Interaction.js'; import _ol_interaction_Interaction_ from '../interaction/Interaction.js';
import _ol_interaction_Pointer_ from '../interaction/Pointer.js'; import _ol_interaction_Pointer_ from '../interaction/Pointer.js';
import _ol_RotationConstraint_ from '../RotationConstraint.js'; import _ol_RotationConstraint_ from '../RotationConstraint.js';
@@ -170,5 +170,5 @@ _ol_interaction_PinchRotate_.handleDownEvent_ = function(mapBrowserEvent) {
/** /**
* @inheritDoc * @inheritDoc
*/ */
_ol_interaction_PinchRotate_.prototype.shouldStopEvent = _ol_functions_.FALSE; _ol_interaction_PinchRotate_.prototype.shouldStopEvent = FALSE;
export default _ol_interaction_PinchRotate_; export default _ol_interaction_PinchRotate_;

View File

@@ -3,7 +3,7 @@
*/ */
import {inherits} from '../index.js'; import {inherits} from '../index.js';
import _ol_ViewHint_ from '../ViewHint.js'; import _ol_ViewHint_ from '../ViewHint.js';
import _ol_functions_ from '../functions.js'; import {FALSE} from '../functions.js';
import _ol_interaction_Interaction_ from '../interaction/Interaction.js'; import _ol_interaction_Interaction_ from '../interaction/Interaction.js';
import _ol_interaction_Pointer_ from '../interaction/Pointer.js'; import _ol_interaction_Pointer_ from '../interaction/Pointer.js';
@@ -169,5 +169,5 @@ _ol_interaction_PinchZoom_.handleDownEvent_ = function(mapBrowserEvent) {
/** /**
* @inheritDoc * @inheritDoc
*/ */
_ol_interaction_PinchZoom_.prototype.shouldStopEvent = _ol_functions_.FALSE; _ol_interaction_PinchZoom_.prototype.shouldStopEvent = FALSE;
export default _ol_interaction_PinchZoom_; export default _ol_interaction_PinchZoom_;

View File

@@ -2,7 +2,7 @@
* @module ol/interaction/Pointer * @module ol/interaction/Pointer
*/ */
import {inherits, nullFunction} from '../index.js'; import {inherits, nullFunction} from '../index.js';
import _ol_functions_ from '../functions.js'; import {FALSE} from '../functions.js';
import _ol_MapBrowserEventType_ from '../MapBrowserEventType.js'; import _ol_MapBrowserEventType_ from '../MapBrowserEventType.js';
import _ol_MapBrowserPointerEvent_ from '../MapBrowserPointerEvent.js'; import _ol_MapBrowserPointerEvent_ from '../MapBrowserPointerEvent.js';
import _ol_interaction_Interaction_ from '../interaction/Interaction.js'; import _ol_interaction_Interaction_ from '../interaction/Interaction.js';
@@ -150,7 +150,7 @@ _ol_interaction_Pointer_.handleDragEvent = nullFunction;
* @return {boolean} Capture dragging. * @return {boolean} Capture dragging.
* @this {ol.interaction.Pointer} * @this {ol.interaction.Pointer}
*/ */
_ol_interaction_Pointer_.handleUpEvent = _ol_functions_.FALSE; _ol_interaction_Pointer_.handleUpEvent = FALSE;
/** /**
@@ -158,7 +158,7 @@ _ol_interaction_Pointer_.handleUpEvent = _ol_functions_.FALSE;
* @return {boolean} Capture dragging. * @return {boolean} Capture dragging.
* @this {ol.interaction.Pointer} * @this {ol.interaction.Pointer}
*/ */
_ol_interaction_Pointer_.handleDownEvent = _ol_functions_.FALSE; _ol_interaction_Pointer_.handleDownEvent = FALSE;
/** /**

View File

@@ -7,7 +7,7 @@ import _ol_array_ from '../array.js';
import _ol_events_ from '../events.js'; import _ol_events_ from '../events.js';
import _ol_events_Event_ from '../events/Event.js'; import _ol_events_Event_ from '../events/Event.js';
import _ol_events_condition_ from '../events/condition.js'; import _ol_events_condition_ from '../events/condition.js';
import _ol_functions_ from '../functions.js'; import {TRUE} from '../functions.js';
import GeometryType from '../geom/GeometryType.js'; import GeometryType from '../geom/GeometryType.js';
import _ol_interaction_Interaction_ from '../interaction/Interaction.js'; import _ol_interaction_Interaction_ from '../interaction/Interaction.js';
import _ol_layer_Vector_ from '../layer/Vector.js'; import _ol_layer_Vector_ from '../layer/Vector.js';
@@ -79,8 +79,7 @@ var _ol_interaction_Select_ = function(opt_options) {
* @private * @private
* @type {ol.SelectFilterFunction} * @type {ol.SelectFilterFunction}
*/ */
this.filter_ = options.filter ? options.filter : this.filter_ = options.filter ? options.filter : TRUE;
_ol_functions_.TRUE;
/** /**
* @private * @private
@@ -118,7 +117,7 @@ var _ol_interaction_Select_ = function(opt_options) {
}; };
} }
} else { } else {
layerFilter = _ol_functions_.TRUE; layerFilter = TRUE;
} }
/** /**

View File

@@ -8,7 +8,7 @@ import _ol_coordinate_ from '../coordinate.js';
import _ol_events_ from '../events.js'; import _ol_events_ from '../events.js';
import _ol_events_EventType_ from '../events/EventType.js'; import _ol_events_EventType_ from '../events/EventType.js';
import {boundingExtent, createEmpty} from '../extent.js'; import {boundingExtent, createEmpty} from '../extent.js';
import _ol_functions_ from '../functions.js'; import {TRUE, FALSE} from '../functions.js';
import GeometryType from '../geom/GeometryType.js'; import GeometryType from '../geom/GeometryType.js';
import Polygon from '../geom/Polygon.js'; import Polygon from '../geom/Polygon.js';
import _ol_interaction_Pointer_ from '../interaction/Pointer.js'; import _ol_interaction_Pointer_ from '../interaction/Pointer.js';
@@ -43,7 +43,7 @@ var _ol_interaction_Snap_ = function(opt_options) {
_ol_interaction_Pointer_.call(this, { _ol_interaction_Pointer_.call(this, {
handleEvent: _ol_interaction_Snap_.handleEvent_, handleEvent: _ol_interaction_Snap_.handleEvent_,
handleDownEvent: _ol_functions_.TRUE, handleDownEvent: TRUE,
handleUpEvent: _ol_interaction_Snap_.handleUpEvent_ handleUpEvent: _ol_interaction_Snap_.handleUpEvent_
}); });
@@ -330,7 +330,7 @@ _ol_interaction_Snap_.prototype.setMap = function(map) {
/** /**
* @inheritDoc * @inheritDoc
*/ */
_ol_interaction_Snap_.prototype.shouldStopEvent = _ol_functions_.FALSE; _ol_interaction_Snap_.prototype.shouldStopEvent = FALSE;
/** /**

View File

@@ -6,7 +6,7 @@ import _ol_Collection_ from '../Collection.js';
import _ol_Object_ from '../Object.js'; import _ol_Object_ from '../Object.js';
import _ol_events_ from '../events.js'; import _ol_events_ from '../events.js';
import _ol_events_Event_ from '../events/Event.js'; import _ol_events_Event_ from '../events/Event.js';
import _ol_functions_ from '../functions.js'; import {TRUE} from '../functions.js';
import _ol_array_ from '../array.js'; import _ol_array_ from '../array.js';
import _ol_interaction_Pointer_ from '../interaction/Pointer.js'; import _ol_interaction_Pointer_ from '../interaction/Pointer.js';
import _ol_interaction_Property_ from '../interaction/Property.js'; import _ol_interaction_Property_ from '../interaction/Property.js';
@@ -58,7 +58,7 @@ var _ol_interaction_Translate_ = function(opt_options) {
}; };
} }
} else { } else {
layerFilter = _ol_functions_.TRUE; layerFilter = TRUE;
} }
/** /**

View File

@@ -8,7 +8,7 @@ import _ol_TileState_ from '../TileState.js';
import _ol_asserts_ from '../asserts.js'; import _ol_asserts_ from '../asserts.js';
import _ol_events_ from '../events.js'; import _ol_events_ from '../events.js';
import _ol_events_EventType_ from '../events/EventType.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'; import _ol_source_State_ from '../source/State.js';
/** /**
@@ -51,7 +51,7 @@ _ol_renderer_Layer_.prototype.forEachFeatureAtCoordinate = nullFunction;
* @param {olx.FrameState} frameState Frame state. * @param {olx.FrameState} frameState Frame state.
* @return {boolean} Is there a feature at the given coordinate? * @return {boolean} Is there a feature at the given coordinate?
*/ */
_ol_renderer_Layer_.prototype.hasFeatureAtCoordinate = _ol_functions_.FALSE; _ol_renderer_Layer_.prototype.hasFeatureAtCoordinate = FALSE;
/** /**

View File

@@ -6,7 +6,7 @@ import _ol_Disposable_ from '../Disposable.js';
import _ol_events_ from '../events.js'; import _ol_events_ from '../events.js';
import _ol_events_EventType_ from '../events/EventType.js'; import _ol_events_EventType_ from '../events/EventType.js';
import {getWidth} from '../extent.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_layer_Layer_ from '../layer/Layer.js';
import _ol_plugins_ from '../plugins.js'; import _ol_plugins_ from '../plugins.js';
import _ol_style_ from '../style.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) { _ol_renderer_Map_.prototype.hasFeatureAtCoordinate = function(coordinate, frameState, hitTolerance, layerFilter, thisArg) {
var hasFeature = this.forEachFeatureAtCoordinate( var hasFeature = this.forEachFeatureAtCoordinate(
coordinate, frameState, hitTolerance, _ol_functions_.TRUE, this, layerFilter, thisArg); coordinate, frameState, hitTolerance, TRUE, this, layerFilter, thisArg);
return hasFeature !== undefined; return hasFeature !== undefined;
}; };

View File

@@ -3,7 +3,7 @@
*/ */
import {inherits} from '../../index.js'; import {inherits} from '../../index.js';
import {getBottomLeft, getBottomRight, getTopLeft, getTopRight} from '../../extent.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_Event_ from '../../render/Event.js';
import _ol_render_EventType_ from '../../render/EventType.js'; import _ol_render_EventType_ from '../../render/EventType.js';
import _ol_render_canvas_ from '../../render/canvas.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 * @template S,T,U
*/ */
_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, 0, 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);

View File

@@ -7,7 +7,7 @@ import _ol_LayerType_ from '../../LayerType.js';
import _ol_ViewHint_ from '../../ViewHint.js'; import _ol_ViewHint_ from '../../ViewHint.js';
import {createCanvasContext2D} from '../../dom.js'; import {createCanvasContext2D} from '../../dom.js';
import {getIntersection, isEmpty} from '../../extent.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_Type_ from '../Type.js';
import _ol_renderer_webgl_Layer_ from '../webgl/Layer.js'; import _ol_renderer_webgl_Layer_ from '../webgl/Layer.js';
import _ol_transform_ from '../../transform.js'; import _ol_transform_ from '../../transform.js';
@@ -234,8 +234,7 @@ _ol_renderer_webgl_ImageLayer_.prototype.updateProjectionMatrix_ = function(canv
* @inheritDoc * @inheritDoc
*/ */
_ol_renderer_webgl_ImageLayer_.prototype.hasFeatureAtCoordinate = function(coordinate, frameState) { _ol_renderer_webgl_ImageLayer_.prototype.hasFeatureAtCoordinate = function(coordinate, frameState) {
var hasFeature = this.forEachFeatureAtCoordinate( var hasFeature = this.forEachFeatureAtCoordinate(coordinate, frameState, 0, TRUE, this);
coordinate, frameState, 0, _ol_functions_.TRUE, this);
return hasFeature !== undefined; 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 // so that for example also transparent polygons are detected
var coordinate = _ol_transform_.apply( var coordinate = _ol_transform_.apply(
frameState.pixelToCoordinateTransform, pixel.slice()); frameState.pixelToCoordinateTransform, pixel.slice());
var hasFeature = this.forEachFeatureAtCoordinate( var hasFeature = this.forEachFeatureAtCoordinate(coordinate, frameState, 0, 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);

View File

@@ -13,7 +13,7 @@ import _ol_events_Event_ from '../events/Event.js';
import _ol_events_EventType_ from '../events/EventType.js'; import _ol_events_EventType_ from '../events/EventType.js';
import {containsExtent, equals} from '../extent.js'; import {containsExtent, equals} from '../extent.js';
import _ol_featureloader_ from '../featureloader.js'; import _ol_featureloader_ from '../featureloader.js';
import _ol_functions_ from '../functions.js'; import {TRUE} from '../functions.js';
import _ol_loadingstrategy_ from '../loadingstrategy.js'; import _ol_loadingstrategy_ from '../loadingstrategy.js';
import _ol_obj_ from '../obj.js'; import _ol_obj_ from '../obj.js';
import _ol_source_Source_ from '../source/Source.js'; import _ol_source_Source_ from '../source/Source.js';
@@ -577,7 +577,7 @@ _ol_source_Vector_.prototype.getClosestFeatureToCoordinate = function(coordinate
var closestPoint = [NaN, NaN]; var closestPoint = [NaN, NaN];
var minSquaredDistance = Infinity; var minSquaredDistance = Infinity;
var extent = [-Infinity, -Infinity, Infinity, Infinity]; var extent = [-Infinity, -Infinity, Infinity, Infinity];
var filter = opt_filter ? opt_filter : _ol_functions_.TRUE; var filter = opt_filter ? opt_filter : TRUE;
this.featuresRtree_.forEachInExtent(extent, this.featuresRtree_.forEachInExtent(extent,
/** /**
* @param {ol.Feature} feature Feature. * @param {ol.Feature} feature Feature.

View File

@@ -1,7 +1,7 @@
/** /**
* @module ol/webgl/Shader * @module ol/webgl/Shader
*/ */
import _ol_functions_ from '../functions.js'; import {FALSE} from '../functions.js';
/** /**
* @constructor * @constructor
@@ -38,5 +38,5 @@ _ol_webgl_Shader_.prototype.getSource = function() {
/** /**
* @return {boolean} Is animated? * @return {boolean} Is animated?
*/ */
_ol_webgl_Shader_.prototype.isAnimated = _ol_functions_.FALSE; _ol_webgl_Shader_.prototype.isAnimated = FALSE;
export default _ol_webgl_Shader_; export default _ol_webgl_Shader_;