rename _ol_math_ imports
This commit is contained in:
@@ -5,7 +5,7 @@ import {inherits} from '../index.js';
|
||||
import _ol_Object_ from '../Object.js';
|
||||
import {easeOut, linear} from '../easing.js';
|
||||
import _ol_interaction_Property_ from '../interaction/Property.js';
|
||||
import _ol_math_ from '../math.js';
|
||||
import {clamp} from '../math.js';
|
||||
|
||||
|
||||
/**
|
||||
@@ -198,7 +198,7 @@ Interaction.zoomByDelta = function(view, delta, opt_anchor, opt_duration) {
|
||||
|
||||
if (resolution !== undefined) {
|
||||
var resolutions = view.getResolutions();
|
||||
resolution = _ol_math_.clamp(
|
||||
resolution = clamp(
|
||||
resolution,
|
||||
view.getMinResolution() || resolutions[resolutions.length - 1],
|
||||
view.getMaxResolution() || resolutions[0]);
|
||||
|
||||
@@ -7,7 +7,7 @@ import {easeOut} from '../easing.js';
|
||||
import EventType from '../events/EventType.js';
|
||||
import _ol_has_ from '../has.js';
|
||||
import Interaction from '../interaction/Interaction.js';
|
||||
import _ol_math_ from '../math.js';
|
||||
import {clamp} from '../math.js';
|
||||
|
||||
|
||||
/**
|
||||
@@ -260,7 +260,7 @@ _ol_interaction_MouseWheelZoom_.prototype.handleWheelZoom_ = function(map) {
|
||||
view.cancelAnimations();
|
||||
}
|
||||
var maxDelta = MAX_DELTA;
|
||||
var delta = _ol_math_.clamp(this.delta_, -maxDelta, maxDelta);
|
||||
var delta = clamp(this.delta_, -maxDelta, maxDelta);
|
||||
Interaction.zoomByDelta(view, -delta, this.lastAnchor_,
|
||||
this.duration_);
|
||||
this.mode_ = undefined;
|
||||
|
||||
Reference in New Issue
Block a user