rename _ol_math_ imports
This commit is contained in:
@@ -8,7 +8,7 @@ import _ol_TileState_ from '../TileState.js';
|
||||
import _ol_events_ from '../events.js';
|
||||
import EventType from '../events/EventType.js';
|
||||
import {getArea, getCenter, getIntersection} from '../extent.js';
|
||||
import _ol_math_ from '../math.js';
|
||||
import {clamp} from '../math.js';
|
||||
import _ol_reproj_ from '../reproj.js';
|
||||
import _ol_reproj_Triangulation_ from '../reproj/Triangulation.js';
|
||||
|
||||
@@ -157,9 +157,9 @@ var _ol_reproj_Tile_ = function(sourceProj, sourceTileGrid,
|
||||
|
||||
if (maxSourceExtent) {
|
||||
if (sourceProj.canWrapX()) {
|
||||
sourceExtent[1] = _ol_math_.clamp(
|
||||
sourceExtent[1] = clamp(
|
||||
sourceExtent[1], maxSourceExtent[1], maxSourceExtent[3]);
|
||||
sourceExtent[3] = _ol_math_.clamp(
|
||||
sourceExtent[3] = clamp(
|
||||
sourceExtent[3], maxSourceExtent[1], maxSourceExtent[3]);
|
||||
} else {
|
||||
sourceExtent = getIntersection(sourceExtent, maxSourceExtent);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
import {boundingExtent, createEmpty, extendCoordinate, getBottomLeft, getBottomRight,
|
||||
getTopLeft, getTopRight, getWidth, intersects} from '../extent.js';
|
||||
import _ol_math_ from '../math.js';
|
||||
import {modulo} from '../math.js';
|
||||
import {getTransform} from '../proj.js';
|
||||
|
||||
|
||||
@@ -270,10 +270,10 @@ _ol_reproj_Triangulation_.prototype.addQuad_ = function(a, b, c, d,
|
||||
var dx;
|
||||
if (wrapsX) {
|
||||
var centerSrcEstimX =
|
||||
(_ol_math_.modulo(aSrc[0], sourceWorldWidth) +
|
||||
_ol_math_.modulo(cSrc[0], sourceWorldWidth)) / 2;
|
||||
(modulo(aSrc[0], sourceWorldWidth) +
|
||||
modulo(cSrc[0], sourceWorldWidth)) / 2;
|
||||
dx = centerSrcEstimX -
|
||||
_ol_math_.modulo(centerSrc[0], sourceWorldWidth);
|
||||
modulo(centerSrc[0], sourceWorldWidth);
|
||||
} else {
|
||||
dx = (aSrc[0] + cSrc[0]) / 2 - centerSrc[0];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user