From 2498bba90a9d597722f4a316f8cfe053530b0879 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Fri, 15 Dec 2017 13:44:32 +0100 Subject: [PATCH] Named exports from ol/functions --- src/ol/PluggableMap.js | 10 ++++------ src/ol/events/condition.js | 6 +++--- src/ol/functions.js | 10 ++++------ src/ol/geom/Geometry.js | 4 ++-- src/ol/geom/SimpleGeometry.js | 4 ++-- src/ol/interaction/DragAndDrop.js | 4 ++-- src/ol/interaction/DragPan.js | 4 ++-- src/ol/interaction/DragRotate.js | 4 ++-- src/ol/interaction/Draw.js | 6 +++--- src/ol/interaction/PinchRotate.js | 4 ++-- src/ol/interaction/PinchZoom.js | 4 ++-- src/ol/interaction/Pointer.js | 6 +++--- src/ol/interaction/Select.js | 7 +++---- src/ol/interaction/Snap.js | 6 +++--- src/ol/interaction/Translate.js | 4 ++-- src/ol/renderer/Layer.js | 4 ++-- src/ol/renderer/Map.js | 4 ++-- src/ol/renderer/canvas/Layer.js | 5 ++--- src/ol/renderer/webgl/ImageLayer.js | 8 +++----- src/ol/source/Vector.js | 4 ++-- src/ol/webgl/Shader.js | 4 ++-- 21 files changed, 52 insertions(+), 60 deletions(-) diff --git a/src/ol/PluggableMap.js b/src/ol/PluggableMap.js index 47d4ea1511..263db5eb44 100644 --- a/src/ol/PluggableMap.js +++ b/src/ol/PluggableMap.js @@ -21,7 +21,7 @@ import _ol_events_ from './events.js'; import _ol_events_Event_ from './events/Event.js'; import _ol_events_EventType_ from './events/EventType.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_layer_Group_ from './layer/Group.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 ? opt_options.hitTolerance * this.frameState_.pixelRatio : 0; var layerFilter = opt_options.layerFilter !== undefined ? - opt_options.layerFilter : _ol_functions_.TRUE; + opt_options.layerFilter : TRUE; return this.renderer_.forEachFeatureAtCoordinate( coordinate, this.frameState_, hitTolerance, callback, null, layerFilter, null); @@ -530,8 +530,7 @@ _ol_PluggableMap_.prototype.forEachLayerAtPixel = function(pixel, callback, opt_ return; } var thisArg = opt_this !== undefined ? opt_this : null; - var layerFilter = opt_layerFilter !== undefined ? - opt_layerFilter : _ol_functions_.TRUE; + var layerFilter = opt_layerFilter !== undefined ? opt_layerFilter : TRUE; var thisArg2 = opt_this2 !== undefined ? opt_this2 : null; return this.renderer_.forEachLayerAtPixel( pixel, this.frameState_, callback, thisArg, @@ -554,8 +553,7 @@ _ol_PluggableMap_.prototype.hasFeatureAtPixel = function(pixel, opt_options) { } var coordinate = this.getCoordinateFromPixel(pixel); opt_options = opt_options !== undefined ? opt_options : {}; - var layerFilter = opt_options.layerFilter !== undefined ? - opt_options.layerFilter : _ol_functions_.TRUE; + var layerFilter = opt_options.layerFilter !== undefined ? opt_options.layerFilter : TRUE; var hitTolerance = opt_options.hitTolerance !== undefined ? opt_options.hitTolerance * this.frameState_.pixelRatio : 0; return this.renderer_.hasFeatureAtCoordinate( diff --git a/src/ol/events/condition.js b/src/ol/events/condition.js index e64295121e..d91fa5ea1b 100644 --- a/src/ol/events/condition.js +++ b/src/ol/events/condition.js @@ -3,7 +3,7 @@ */ import _ol_MapBrowserEventType_ from '../MapBrowserEventType.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'; var _ol_events_condition_ = {}; @@ -50,7 +50,7 @@ _ol_events_condition_.altShiftKeysOnly = function(mapBrowserEvent) { * @function * @api */ -_ol_events_condition_.always = _ol_functions_.TRUE; +_ol_events_condition_.always = TRUE; /** @@ -89,7 +89,7 @@ _ol_events_condition_.mouseActionButton = function(mapBrowserEvent) { * @function * @api */ -_ol_events_condition_.never = _ol_functions_.FALSE; +_ol_events_condition_.never = FALSE; /** diff --git a/src/ol/functions.js b/src/ol/functions.js index 2f58ffc6a5..dba014d1e0 100644 --- a/src/ol/functions.js +++ b/src/ol/functions.js @@ -1,21 +1,19 @@ /** * @module ol/functions */ -var _ol_functions_ = {}; /** * Always returns true. * @returns {boolean} true. */ -_ol_functions_.TRUE = function() { +export function TRUE() { return true; -}; +} /** * Always returns false. * @returns {boolean} false. */ -_ol_functions_.FALSE = function() { +export function FALSE() { return false; -}; -export default _ol_functions_; +} diff --git a/src/ol/geom/Geometry.js b/src/ol/geom/Geometry.js index bb04449366..ca6a58f891 100644 --- a/src/ol/geom/Geometry.js +++ b/src/ol/geom/Geometry.js @@ -4,7 +4,7 @@ import {inherits} from '../index.js'; import _ol_Object_ from '../Object.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 {get as getProjection, getTransform} from '../proj.js'; import _ol_proj_Units_ from '../proj/Units.js'; @@ -129,7 +129,7 @@ Geometry.prototype.computeExtent = function(extent) {}; * @param {number} y Y. * @return {boolean} Contains (x, y). */ -Geometry.prototype.containsXY = _ol_functions_.FALSE; +Geometry.prototype.containsXY = FALSE; /** diff --git a/src/ol/geom/SimpleGeometry.js b/src/ol/geom/SimpleGeometry.js index 01fbdd445e..aa7389bfe4 100644 --- a/src/ol/geom/SimpleGeometry.js +++ b/src/ol/geom/SimpleGeometry.js @@ -2,7 +2,7 @@ * @module ol/geom/SimpleGeometry */ import {inherits} from '../index.js'; -import _ol_functions_ from '../functions.js'; +import {FALSE} from '../functions.js'; import {createOrUpdateFromFlatCoordinates, getCenter} from '../extent.js'; import Geometry from '../geom/Geometry.js'; import GeometryLayout from '../geom/GeometryLayout.js'; @@ -84,7 +84,7 @@ SimpleGeometry.getStrideForLayout = function(layout) { /** * @inheritDoc */ -SimpleGeometry.prototype.containsXY = _ol_functions_.FALSE; +SimpleGeometry.prototype.containsXY = FALSE; /** diff --git a/src/ol/interaction/DragAndDrop.js b/src/ol/interaction/DragAndDrop.js index 1485c27d06..8551e3c896 100644 --- a/src/ol/interaction/DragAndDrop.js +++ b/src/ol/interaction/DragAndDrop.js @@ -4,7 +4,7 @@ // FIXME should handle all geo-referenced data, not just vector data 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_Event_ from '../events/Event.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} * @api */ -_ol_interaction_DragAndDrop_.handleEvent = _ol_functions_.TRUE; +_ol_interaction_DragAndDrop_.handleEvent = TRUE; /** diff --git a/src/ol/interaction/DragPan.js b/src/ol/interaction/DragPan.js index 989783e564..cd30a4aab7 100644 --- a/src/ol/interaction/DragPan.js +++ b/src/ol/interaction/DragPan.js @@ -6,7 +6,7 @@ import _ol_ViewHint_ from '../ViewHint.js'; import _ol_coordinate_ from '../coordinate.js'; import {easeOut} from '../easing.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'; /** @@ -171,5 +171,5 @@ _ol_interaction_DragPan_.handleDownEvent_ = function(mapBrowserEvent) { /** * @inheritDoc */ -_ol_interaction_DragPan_.prototype.shouldStopEvent = _ol_functions_.FALSE; +_ol_interaction_DragPan_.prototype.shouldStopEvent = FALSE; export default _ol_interaction_DragPan_; diff --git a/src/ol/interaction/DragRotate.js b/src/ol/interaction/DragRotate.js index c820937e29..6f02f60509 100644 --- a/src/ol/interaction/DragRotate.js +++ b/src/ol/interaction/DragRotate.js @@ -5,7 +5,7 @@ import {inherits} from '../index.js'; import _ol_RotationConstraint_ from '../RotationConstraint.js'; import _ol_ViewHint_ from '../ViewHint.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_Pointer_ from '../interaction/Pointer.js'; @@ -131,5 +131,5 @@ _ol_interaction_DragRotate_.handleDownEvent_ = function(mapBrowserEvent) { /** * @inheritDoc */ -_ol_interaction_DragRotate_.prototype.shouldStopEvent = _ol_functions_.FALSE; +_ol_interaction_DragRotate_.prototype.shouldStopEvent = FALSE; export default _ol_interaction_DragRotate_; diff --git a/src/ol/interaction/Draw.js b/src/ol/interaction/Draw.js index a9ba7f9440..b88f769a5a 100644 --- a/src/ol/interaction/Draw.js +++ b/src/ol/interaction/Draw.js @@ -10,7 +10,7 @@ import _ol_events_ from '../events.js'; import _ol_events_Event_ from '../events/Event.js'; import _ol_events_condition_ from '../events/condition.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 GeometryType from '../geom/GeometryType.js'; import LineString from '../geom/LineString.js'; @@ -129,7 +129,7 @@ var _ol_interaction_Draw_ = function(options) { * @private * @type {ol.EventsConditionType} */ - this.finishCondition_ = options.finishCondition ? options.finishCondition : _ol_functions_.TRUE; + this.finishCondition_ = options.finishCondition ? options.finishCondition : TRUE; var geometryFunction = options.geometryFunction; if (!geometryFunction) { @@ -735,7 +735,7 @@ _ol_interaction_Draw_.prototype.extend = function(feature) { /** * @inheritDoc */ -_ol_interaction_Draw_.prototype.shouldStopEvent = _ol_functions_.FALSE; +_ol_interaction_Draw_.prototype.shouldStopEvent = FALSE; /** diff --git a/src/ol/interaction/PinchRotate.js b/src/ol/interaction/PinchRotate.js index a58b2e4bbc..9d611795d4 100644 --- a/src/ol/interaction/PinchRotate.js +++ b/src/ol/interaction/PinchRotate.js @@ -3,7 +3,7 @@ */ import {inherits} from '../index.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_Pointer_ from '../interaction/Pointer.js'; import _ol_RotationConstraint_ from '../RotationConstraint.js'; @@ -170,5 +170,5 @@ _ol_interaction_PinchRotate_.handleDownEvent_ = function(mapBrowserEvent) { /** * @inheritDoc */ -_ol_interaction_PinchRotate_.prototype.shouldStopEvent = _ol_functions_.FALSE; +_ol_interaction_PinchRotate_.prototype.shouldStopEvent = FALSE; export default _ol_interaction_PinchRotate_; diff --git a/src/ol/interaction/PinchZoom.js b/src/ol/interaction/PinchZoom.js index d60b511bdb..1bfc4a86a1 100644 --- a/src/ol/interaction/PinchZoom.js +++ b/src/ol/interaction/PinchZoom.js @@ -3,7 +3,7 @@ */ import {inherits} from '../index.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_Pointer_ from '../interaction/Pointer.js'; @@ -169,5 +169,5 @@ _ol_interaction_PinchZoom_.handleDownEvent_ = function(mapBrowserEvent) { /** * @inheritDoc */ -_ol_interaction_PinchZoom_.prototype.shouldStopEvent = _ol_functions_.FALSE; +_ol_interaction_PinchZoom_.prototype.shouldStopEvent = FALSE; export default _ol_interaction_PinchZoom_; diff --git a/src/ol/interaction/Pointer.js b/src/ol/interaction/Pointer.js index 40735c1460..30216c1fbf 100644 --- a/src/ol/interaction/Pointer.js +++ b/src/ol/interaction/Pointer.js @@ -2,7 +2,7 @@ * @module ol/interaction/Pointer */ 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_MapBrowserPointerEvent_ from '../MapBrowserPointerEvent.js'; import _ol_interaction_Interaction_ from '../interaction/Interaction.js'; @@ -150,7 +150,7 @@ _ol_interaction_Pointer_.handleDragEvent = nullFunction; * @return {boolean} Capture dragging. * @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. * @this {ol.interaction.Pointer} */ -_ol_interaction_Pointer_.handleDownEvent = _ol_functions_.FALSE; +_ol_interaction_Pointer_.handleDownEvent = FALSE; /** diff --git a/src/ol/interaction/Select.js b/src/ol/interaction/Select.js index ede8a0ed9c..5b19ea84c0 100644 --- a/src/ol/interaction/Select.js +++ b/src/ol/interaction/Select.js @@ -7,7 +7,7 @@ import _ol_array_ from '../array.js'; import _ol_events_ from '../events.js'; import _ol_events_Event_ from '../events/Event.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 _ol_interaction_Interaction_ from '../interaction/Interaction.js'; import _ol_layer_Vector_ from '../layer/Vector.js'; @@ -79,8 +79,7 @@ var _ol_interaction_Select_ = function(opt_options) { * @private * @type {ol.SelectFilterFunction} */ - this.filter_ = options.filter ? options.filter : - _ol_functions_.TRUE; + this.filter_ = options.filter ? options.filter : TRUE; /** * @private @@ -118,7 +117,7 @@ var _ol_interaction_Select_ = function(opt_options) { }; } } else { - layerFilter = _ol_functions_.TRUE; + layerFilter = TRUE; } /** diff --git a/src/ol/interaction/Snap.js b/src/ol/interaction/Snap.js index ced18b5e8e..2f39d3231c 100644 --- a/src/ol/interaction/Snap.js +++ b/src/ol/interaction/Snap.js @@ -8,7 +8,7 @@ import _ol_coordinate_ from '../coordinate.js'; import _ol_events_ from '../events.js'; import _ol_events_EventType_ from '../events/EventType.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 Polygon from '../geom/Polygon.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, { handleEvent: _ol_interaction_Snap_.handleEvent_, - handleDownEvent: _ol_functions_.TRUE, + handleDownEvent: TRUE, handleUpEvent: _ol_interaction_Snap_.handleUpEvent_ }); @@ -330,7 +330,7 @@ _ol_interaction_Snap_.prototype.setMap = function(map) { /** * @inheritDoc */ -_ol_interaction_Snap_.prototype.shouldStopEvent = _ol_functions_.FALSE; +_ol_interaction_Snap_.prototype.shouldStopEvent = FALSE; /** diff --git a/src/ol/interaction/Translate.js b/src/ol/interaction/Translate.js index 7560b17205..f146f219cd 100644 --- a/src/ol/interaction/Translate.js +++ b/src/ol/interaction/Translate.js @@ -6,7 +6,7 @@ import _ol_Collection_ from '../Collection.js'; import _ol_Object_ from '../Object.js'; import _ol_events_ from '../events.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_interaction_Pointer_ from '../interaction/Pointer.js'; import _ol_interaction_Property_ from '../interaction/Property.js'; @@ -58,7 +58,7 @@ var _ol_interaction_Translate_ = function(opt_options) { }; } } else { - layerFilter = _ol_functions_.TRUE; + layerFilter = TRUE; } /** diff --git a/src/ol/renderer/Layer.js b/src/ol/renderer/Layer.js index e61ad6104a..9f7edb84b4 100644 --- a/src/ol/renderer/Layer.js +++ b/src/ol/renderer/Layer.js @@ -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; /** diff --git a/src/ol/renderer/Map.js b/src/ol/renderer/Map.js index e566c75ac6..27085d2d6d 100644 --- a/src/ol/renderer/Map.js +++ b/src/ol/renderer/Map.js @@ -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; }; diff --git a/src/ol/renderer/canvas/Layer.js b/src/ol/renderer/canvas/Layer.js index 4526d08f4e..bbed7a791d 100644 --- a/src/ol/renderer/canvas/Layer.js +++ b/src/ol/renderer/canvas/Layer.js @@ -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); diff --git a/src/ol/renderer/webgl/ImageLayer.js b/src/ol/renderer/webgl/ImageLayer.js index c22d949704..13f2b3c1d2 100644 --- a/src/ol/renderer/webgl/ImageLayer.js +++ b/src/ol/renderer/webgl/ImageLayer.js @@ -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); diff --git a/src/ol/source/Vector.js b/src/ol/source/Vector.js index 1b91059048..76f36d86da 100644 --- a/src/ol/source/Vector.js +++ b/src/ol/source/Vector.js @@ -13,7 +13,7 @@ import _ol_events_Event_ from '../events/Event.js'; import _ol_events_EventType_ from '../events/EventType.js'; import {containsExtent, equals} from '../extent.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_obj_ from '../obj.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 minSquaredDistance = 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, /** * @param {ol.Feature} feature Feature. diff --git a/src/ol/webgl/Shader.js b/src/ol/webgl/Shader.js index 74dd40cf70..deb547a161 100644 --- a/src/ol/webgl/Shader.js +++ b/src/ol/webgl/Shader.js @@ -1,7 +1,7 @@ /** * @module ol/webgl/Shader */ -import _ol_functions_ from '../functions.js'; +import {FALSE} from '../functions.js'; /** * @constructor @@ -38,5 +38,5 @@ _ol_webgl_Shader_.prototype.getSource = function() { /** * @return {boolean} Is animated? */ -_ol_webgl_Shader_.prototype.isAnimated = _ol_functions_.FALSE; +_ol_webgl_Shader_.prototype.isAnimated = FALSE; export default _ol_webgl_Shader_;