Skip to content

Commit

Permalink
Disable zoom animation for Line/PolyUtil tests (#8478)
Browse files Browse the repository at this point in the history
  • Loading branch information
mourner authored and jonkoops committed Sep 29, 2022
1 parent d726454 commit 822e557
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions spec/suites/geometry/LineUtilSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ describe('LineUtil', function () {
describe('#polylineCenter', function () {
var map, crs, zoom;
beforeEach(function () {
map = L.map(document.createElement('div'), {center: [55.8, 37.6], zoom: 6});
map = L.map(document.createElement('div'), {center: [55.8, 37.6], zoom: 6, zoomAnimation: false});
crs = map.options.crs;
zoom = map.getZoom();
});
Expand Down Expand Up @@ -158,7 +158,7 @@ describe('LineUtil', function () {

it('computes center of a small line and test it on every zoom - CRS.EPSG3395', function () {
map.remove();
map = L.map(document.createElement('div'), {center: [55.8, 37.6], zoom: 6, crs: L.CRS.EPSG3395});
map = L.map(document.createElement('div'), {center: [55.8, 37.6], zoom: 6, crs: L.CRS.EPSG3395, zoomAnimation: false});

var latlngs = [[50.49898323576035, 30.509834789772036], [50.49998323576035, 30.509834789772036], [50.49998323576035, 30.509939789772037], [50.49898323576035, 30.509939789772037]];

Expand All @@ -176,7 +176,7 @@ describe('LineUtil', function () {

it('computes center of a small line and test it on every zoom - CRS.EPSG4326', function () {
map.remove();
map = L.map(document.createElement('div'), {center: [55.8, 37.6], zoom: 6, crs: L.CRS.EPSG4326});
map = L.map(document.createElement('div'), {center: [55.8, 37.6], zoom: 6, crs: L.CRS.EPSG4326, zoomAnimation: false});

var latlngs = [[50.49898323576035, 30.509834789772036], [50.49998323576035, 30.509834789772036], [50.49998323576035, 30.509939789772037], [50.49898323576035, 30.509939789772037]];

Expand All @@ -194,7 +194,7 @@ describe('LineUtil', function () {

it('computes center of a small line and test it on every zoom - CRS.Simple', function () {
map.remove();
map = L.map(document.createElement('div'), {center: [55.8, 37.6], zoom: 6, crs: L.CRS.Simple});
map = L.map(document.createElement('div'), {center: [55.8, 37.6], zoom: 6, crs: L.CRS.Simple, zoomAnimation: false});

var latlngs = [[50.49898323576035, 30.509834789772036], [50.49998323576035, 30.509834789772036], [50.49998323576035, 30.509939789772037], [50.49898323576035, 30.509939789772037]];

Expand Down
8 changes: 4 additions & 4 deletions spec/suites/geometry/PolyUtilSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('PolyUtil', function () {
describe('#polygonCenter', function () {
var map, crs, zoom;
beforeEach(function () {
map = L.map(document.createElement('div'), {center: [55.8, 37.6], zoom: 6});
map = L.map(document.createElement('div'), {center: [55.8, 37.6], zoom: 6, zoomAnimation: false});
crs = map.options.crs;
zoom = map.getZoom();
});
Expand Down Expand Up @@ -83,7 +83,7 @@ describe('PolyUtil', function () {

it('computes center of a small polygon and test it on every zoom - CRS.EPSG3395', function () {
map.remove();
map = L.map(document.createElement('div'), {center: [55.8, 37.6], zoom: 6, crs: L.CRS.EPSG3395});
map = L.map(document.createElement('div'), {center: [55.8, 37.6], zoom: 6, crs: L.CRS.EPSG3395, zoomAnimation: false});

var latlngs = [[50.49898323576035, 30.509834789772036], [50.49998323576035, 30.509834789772036], [50.49998323576035, 30.509939789772037], [50.49898323576035, 30.509939789772037]];

Expand All @@ -101,7 +101,7 @@ describe('PolyUtil', function () {

it('computes center of a small polygon and test it on every zoom - CRS.EPSG4326', function () {
map.remove();
map = L.map(document.createElement('div'), {center: [55.8, 37.6], zoom: 6, crs: L.CRS.EPSG4326});
map = L.map(document.createElement('div'), {center: [55.8, 37.6], zoom: 6, crs: L.CRS.EPSG4326, zoomAnimation: false});

var latlngs = [[50.49898323576035, 30.509834789772036], [50.49998323576035, 30.509834789772036], [50.49998323576035, 30.509939789772037], [50.49898323576035, 30.509939789772037]];

Expand All @@ -119,7 +119,7 @@ describe('PolyUtil', function () {

it('computes center of a small polygon and test it on every zoom - CRS.Simple', function () {
map.remove();
map = L.map(document.createElement('div'), {center: [55.8, 37.6], zoom: 6, crs: L.CRS.Simple});
map = L.map(document.createElement('div'), {center: [55.8, 37.6], zoom: 6, crs: L.CRS.Simple, zoomAnimation: false});

var latlngs = [[50.49898323576035, 30.509834789772036], [50.49998323576035, 30.509834789772036], [50.49998323576035, 30.509939789772037], [50.49898323576035, 30.509939789772037]];

Expand Down

0 comments on commit 822e557

Please sign in to comment.