Move the nullFunction to ol/functions

And rename it to `UNDEFINED`.
This commit is contained in:
Frederic Junod
2018-03-01 10:52:23 +01:00
parent a30d9a41b8
commit b50a47114e
21 changed files with 72 additions and 63 deletions

View File

@@ -1,7 +1,8 @@
/**
* @module ol/source/Source
*/
import {inherits, nullFunction} from '../index.js';
import {inherits} from '../index.js';
import {UNDEFINED} from '../functions.js';
import BaseObject from '../Object.js';
import {get as getProjection} from '../proj.js';
import SourceState from '../source/State.js';
@@ -89,7 +90,7 @@ Source.prototype.adaptAttributions_ = function(attributionLike) {
* @return {T|undefined} Callback result.
* @template T
*/
Source.prototype.forEachFeatureAtCoordinate = nullFunction;
Source.prototype.forEachFeatureAtCoordinate = UNDEFINED;
/**

View File

@@ -1,7 +1,8 @@
/**
* @module ol/source/Tile
*/
import {inherits, nullFunction} from '../index.js';
import {inherits} from '../index.js';
import {UNDEFINED} from '../functions.js';
import TileCache from '../TileCache.js';
import TileState from '../TileState.js';
import Event from '../events/Event.js';
@@ -303,7 +304,7 @@ TileSource.prototype.refresh = function() {
* @param {number} y Tile coordinate y.
* @param {ol.proj.Projection} projection Projection.
*/
TileSource.prototype.useTile = nullFunction;
TileSource.prototype.useTile = UNDEFINED;
/**

View File

@@ -2,7 +2,7 @@
* @module ol/source/Vector
*/
import {getUid, inherits, nullFunction} from '../index.js';
import {getUid, inherits} from '../index.js';
import Collection from '../Collection.js';
import CollectionEventType from '../CollectionEventType.js';
import ObjectEventType from '../ObjectEventType.js';
@@ -13,7 +13,7 @@ import Event from '../events/Event.js';
import EventType from '../events/EventType.js';
import {containsExtent, equals} from '../extent.js';
import {xhr} from '../featureloader.js';
import {TRUE} from '../functions.js';
import {TRUE, UNDEFINED} from '../functions.js';
import {all as allStrategy} from '../loadingstrategy.js';
import {isEmpty, getValues} from '../obj.js';
import Source from '../source/Source.js';
@@ -75,7 +75,7 @@ const VectorSource = function(opt_options) {
* @private
* @type {ol.FeatureLoader}
*/
this.loader_ = nullFunction;
this.loader_ = UNDEFINED;
/**
* @private