Remove lint
This commit is contained in:
@@ -519,10 +519,12 @@ describe('ol/extent.js', function () {
|
||||
});
|
||||
|
||||
it('works for rotation', function () {
|
||||
const extent = _ol_extent_.getForViewAndSize([0, 0], 1, Math.PI / 4, [
|
||||
const extent = _ol_extent_.getForViewAndSize(
|
||||
[0, 0],
|
||||
1,
|
||||
1,
|
||||
]);
|
||||
Math.PI / 4,
|
||||
[1, 1]
|
||||
);
|
||||
expect(extent[0]).to.roughlyEqual(-Math.sqrt(0.5), 1e-9);
|
||||
expect(extent[2]).to.roughlyEqual(Math.sqrt(0.5), 1e-9);
|
||||
expect(extent[1]).to.roughlyEqual(-Math.sqrt(0.5), 1e-9);
|
||||
@@ -889,85 +891,55 @@ describe('ol/extent.js', function () {
|
||||
|
||||
it('leaves real world extent untouched', function () {
|
||||
expect(_ol_extent_.wrapX([16, 48, 18, 49], projection)).to.eql([
|
||||
16,
|
||||
48,
|
||||
18,
|
||||
49,
|
||||
16, 48, 18, 49,
|
||||
]);
|
||||
});
|
||||
|
||||
it('moves left world extent to real world', function () {
|
||||
expect(_ol_extent_.wrapX([-344, 48, -342, 49], projection)).to.eql([
|
||||
16,
|
||||
48,
|
||||
18,
|
||||
49,
|
||||
16, 48, 18, 49,
|
||||
]);
|
||||
});
|
||||
|
||||
it('moves right world extent to real world', function () {
|
||||
expect(_ol_extent_.wrapX([376, 48, 378, 49], projection)).to.eql([
|
||||
16,
|
||||
48,
|
||||
18,
|
||||
49,
|
||||
16, 48, 18, 49,
|
||||
]);
|
||||
});
|
||||
|
||||
it('moves far off left extent to real world', function () {
|
||||
expect(_ol_extent_.wrapX([-1064, 48, -1062, 49], projection)).to.eql([
|
||||
16,
|
||||
48,
|
||||
18,
|
||||
49,
|
||||
16, 48, 18, 49,
|
||||
]);
|
||||
});
|
||||
|
||||
it('moves far off right extent to real world', function () {
|
||||
expect(_ol_extent_.wrapX([1096, 48, 1098, 49], projection)).to.eql([
|
||||
16,
|
||||
48,
|
||||
18,
|
||||
49,
|
||||
16, 48, 18, 49,
|
||||
]);
|
||||
});
|
||||
|
||||
it('leaves -180 crossing extent with real world center untouched', function () {
|
||||
expect(_ol_extent_.wrapX([-184, 48, 16, 49], projection)).to.eql([
|
||||
-184,
|
||||
48,
|
||||
16,
|
||||
49,
|
||||
-184, 48, 16, 49,
|
||||
]);
|
||||
});
|
||||
|
||||
it('moves +180 crossing extent with off-world center to the real world', function () {
|
||||
expect(_ol_extent_.wrapX([300, 48, 376, 49], projection)).to.eql([
|
||||
-60,
|
||||
48,
|
||||
16,
|
||||
49,
|
||||
-60, 48, 16, 49,
|
||||
]);
|
||||
});
|
||||
|
||||
it('produces the same real world extent for shifted extents with center at +/-180', function () {
|
||||
expect(_ol_extent_.wrapX([360, -90, 720, 90], projection)).to.eql([
|
||||
-360,
|
||||
-90,
|
||||
0,
|
||||
90,
|
||||
-360, -90, 0, 90,
|
||||
]);
|
||||
expect(_ol_extent_.wrapX([0, -90, 360, 90], projection)).to.eql([
|
||||
-360,
|
||||
-90,
|
||||
0,
|
||||
90,
|
||||
-360, -90, 0, 90,
|
||||
]);
|
||||
expect(_ol_extent_.wrapX([-360, -90, 0, 90], projection)).to.eql([
|
||||
-360,
|
||||
-90,
|
||||
0,
|
||||
90,
|
||||
-360, -90, 0, 90,
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user