Make linter happy.
This commit is contained in:
parent
5c0ad75b44
commit
afd7959959
@ -633,7 +633,7 @@ describe("Map", function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('zoomIn zooms by 1 zoom level by default', function (done) {
|
it('zoomIn zooms by 1 zoom level by default', function (done) {
|
||||||
map.once('zoomend', function() {
|
map.once('zoomend', function () {
|
||||||
expect(map.getZoom()).to.eql(11);
|
expect(map.getZoom()).to.eql(11);
|
||||||
expect(map.getCenter()).to.eql(center);
|
expect(map.getCenter()).to.eql(center);
|
||||||
done();
|
done();
|
||||||
@ -642,7 +642,7 @@ describe("Map", function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('zoomOut zooms by 1 zoom level by default', function (done) {
|
it('zoomOut zooms by 1 zoom level by default', function (done) {
|
||||||
map.once('zoomend', function() {
|
map.once('zoomend', function () {
|
||||||
expect(map.getZoom()).to.eql(9);
|
expect(map.getZoom()).to.eql(9);
|
||||||
expect(map.getCenter()).to.eql(center);
|
expect(map.getCenter()).to.eql(center);
|
||||||
done();
|
done();
|
||||||
@ -654,7 +654,7 @@ describe("Map", function () {
|
|||||||
L.Browser.any3d = false;
|
L.Browser.any3d = false;
|
||||||
map.options.zoomSnap = 0.25;
|
map.options.zoomSnap = 0.25;
|
||||||
map.options.zoomDelta = 0.25;
|
map.options.zoomDelta = 0.25;
|
||||||
map.once('zoomend', function() {
|
map.once('zoomend', function () {
|
||||||
expect(map.getZoom()).to.eql(11);
|
expect(map.getZoom()).to.eql(11);
|
||||||
expect(map.getCenter()).to.eql(center);
|
expect(map.getCenter()).to.eql(center);
|
||||||
done();
|
done();
|
||||||
@ -667,7 +667,7 @@ describe("Map", function () {
|
|||||||
map.options.zoomSnap = 0.25;
|
map.options.zoomSnap = 0.25;
|
||||||
map.options.zoomDelta = 0.25;
|
map.options.zoomDelta = 0.25;
|
||||||
map.setView(center, 10);
|
map.setView(center, 10);
|
||||||
map.once('zoomend', function() {
|
map.once('zoomend', function () {
|
||||||
expect(map.getZoom()).to.eql(10.25);
|
expect(map.getZoom()).to.eql(10.25);
|
||||||
expect(map.getCenter()).to.eql(center);
|
expect(map.getCenter()).to.eql(center);
|
||||||
done();
|
done();
|
||||||
@ -680,7 +680,7 @@ describe("Map", function () {
|
|||||||
map.options.zoomSnap = 0.25;
|
map.options.zoomSnap = 0.25;
|
||||||
map.options.zoomDelta = 0.25;
|
map.options.zoomDelta = 0.25;
|
||||||
map.setView(center, 10);
|
map.setView(center, 10);
|
||||||
map.once('zoomend', function() {
|
map.once('zoomend', function () {
|
||||||
expect(map.getZoom()).to.eql(9.75);
|
expect(map.getZoom()).to.eql(9.75);
|
||||||
expect(map.getCenter()).to.eql(center);
|
expect(map.getCenter()).to.eql(center);
|
||||||
done();
|
done();
|
||||||
@ -691,7 +691,7 @@ describe("Map", function () {
|
|||||||
it('zoomIn snaps to zoomSnap on any3d browsers', function (done) {
|
it('zoomIn snaps to zoomSnap on any3d browsers', function (done) {
|
||||||
map.options.zoomSnap = 0.25;
|
map.options.zoomSnap = 0.25;
|
||||||
map.setView(center, 10);
|
map.setView(center, 10);
|
||||||
map.once('zoomend', function() {
|
map.once('zoomend', function () {
|
||||||
expect(map.getZoom()).to.eql(10.25);
|
expect(map.getZoom()).to.eql(10.25);
|
||||||
expect(map.getCenter()).to.eql(center);
|
expect(map.getCenter()).to.eql(center);
|
||||||
done();
|
done();
|
||||||
@ -703,7 +703,7 @@ describe("Map", function () {
|
|||||||
it('zoomOut snaps to zoomSnap on any3d browsers', function (done) {
|
it('zoomOut snaps to zoomSnap on any3d browsers', function (done) {
|
||||||
map.options.zoomSnap = 0.25;
|
map.options.zoomSnap = 0.25;
|
||||||
map.setView(center, 10);
|
map.setView(center, 10);
|
||||||
map.once('zoomend', function() {
|
map.once('zoomend', function () {
|
||||||
expect(map.getZoom()).to.eql(9.75);
|
expect(map.getZoom()).to.eql(9.75);
|
||||||
expect(map.getCenter()).to.eql(center);
|
expect(map.getCenter()).to.eql(center);
|
||||||
done();
|
done();
|
||||||
@ -726,12 +726,12 @@ describe("Map", function () {
|
|||||||
map.setView(center, 10);
|
map.setView(center, 10);
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(function() {
|
afterEach(function () {
|
||||||
document.body.removeChild(map.getContainer());
|
document.body.removeChild(map.getContainer());
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Snaps zoom level to integer by default', function (done) {
|
it('Snaps zoom level to integer by default', function (done) {
|
||||||
map.once('zoomend', function() {
|
map.once('zoomend', function () {
|
||||||
expect(map.getZoom()).to.eql(2);
|
expect(map.getZoom()).to.eql(2);
|
||||||
expect(map.getCenter().equals(boundsCenter, 0.05)).to.eql(true);
|
expect(map.getCenter().equals(boundsCenter, 0.05)).to.eql(true);
|
||||||
done();
|
done();
|
||||||
@ -742,7 +742,7 @@ describe("Map", function () {
|
|||||||
it('Snaps zoom to zoomSnap on any3d browsers', function (done) {
|
it('Snaps zoom to zoomSnap on any3d browsers', function (done) {
|
||||||
map.options.zoomSnap = 0.25;
|
map.options.zoomSnap = 0.25;
|
||||||
L.Browser.any3d = true;
|
L.Browser.any3d = true;
|
||||||
map.once('zoomend', function() {
|
map.once('zoomend', function () {
|
||||||
expect(map.getZoom()).to.eql(2.75);
|
expect(map.getZoom()).to.eql(2.75);
|
||||||
expect(map.getCenter().equals(boundsCenter, 0.05)).to.eql(true);
|
expect(map.getCenter().equals(boundsCenter, 0.05)).to.eql(true);
|
||||||
done();
|
done();
|
||||||
@ -753,7 +753,7 @@ describe("Map", function () {
|
|||||||
it('Ignores zoomSnap on non-any3d browsers', function (done) {
|
it('Ignores zoomSnap on non-any3d browsers', function (done) {
|
||||||
map.options.zoomSnap = 0.25;
|
map.options.zoomSnap = 0.25;
|
||||||
L.Browser.any3d = false;
|
L.Browser.any3d = false;
|
||||||
map.once('zoomend', function() {
|
map.once('zoomend', function () {
|
||||||
expect(map.getZoom()).to.eql(2);
|
expect(map.getZoom()).to.eql(2);
|
||||||
expect(map.getCenter().equals(boundsCenter, 0.05)).to.eql(true);
|
expect(map.getCenter().equals(boundsCenter, 0.05)).to.eql(true);
|
||||||
done();
|
done();
|
||||||
|
@ -577,7 +577,7 @@ L.Map = L.Evented.extend({
|
|||||||
return this.fire('moveend');
|
return this.fire('moveend');
|
||||||
},
|
},
|
||||||
|
|
||||||
_stop: function() {
|
_stop: function () {
|
||||||
L.Util.cancelAnimFrame(this._flyToFrame);
|
L.Util.cancelAnimFrame(this._flyToFrame);
|
||||||
if (this._panAnim) {
|
if (this._panAnim) {
|
||||||
this._panAnim.stop();
|
this._panAnim.stop();
|
||||||
|
Loading…
Reference in New Issue
Block a user