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

@@ -2,7 +2,8 @@
* @module ol/View
*/
import {DEFAULT_TILE_SIZE} from './tilegrid/common.js';
import {inherits, getUid, nullFunction} from './index.js';
import {inherits, getUid} from './index.js';
import {UNDEFINED} from './functions.js';
import {createExtent, none as centerNone} from './centerconstraint.js';
import BaseObject from './Object.js';
import {createSnapToResolutions, createSnapToPower} from './resolutionconstraint.js';
@@ -948,7 +949,7 @@ View.prototype.fit = function(geometryOrExtent, opt_options) {
const centerX = centerRotX * cosAngle - centerRotY * sinAngle;
const centerY = centerRotY * cosAngle + centerRotX * sinAngle;
const center = [centerX, centerY];
const callback = options.callback ? options.callback : nullFunction;
const callback = options.callback ? options.callback : UNDEFINED;
if (options.duration !== undefined) {
this.animate({