Make linter happy.

This commit is contained in:
Iván Sánchez Ortega 2015-09-28 12:22:48 +02:00
parent 5c0ad75b44
commit afd7959959
2 changed files with 12 additions and 12 deletions

View File

@ -633,7 +633,7 @@ describe("Map", function () {
});
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.getCenter()).to.eql(center);
done();
@ -642,7 +642,7 @@ describe("Map", function () {
});
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.getCenter()).to.eql(center);
done();
@ -654,7 +654,7 @@ describe("Map", function () {
L.Browser.any3d = false;
map.options.zoomSnap = 0.25;
map.options.zoomDelta = 0.25;
map.once('zoomend', function() {
map.once('zoomend', function () {
expect(map.getZoom()).to.eql(11);
expect(map.getCenter()).to.eql(center);
done();
@ -667,7 +667,7 @@ describe("Map", function () {
map.options.zoomSnap = 0.25;
map.options.zoomDelta = 0.25;
map.setView(center, 10);
map.once('zoomend', function() {
map.once('zoomend', function () {
expect(map.getZoom()).to.eql(10.25);
expect(map.getCenter()).to.eql(center);
done();
@ -680,7 +680,7 @@ describe("Map", function () {
map.options.zoomSnap = 0.25;
map.options.zoomDelta = 0.25;
map.setView(center, 10);
map.once('zoomend', function() {
map.once('zoomend', function () {
expect(map.getZoom()).to.eql(9.75);
expect(map.getCenter()).to.eql(center);
done();
@ -691,7 +691,7 @@ describe("Map", function () {
it('zoomIn snaps to zoomSnap on any3d browsers', function (done) {
map.options.zoomSnap = 0.25;
map.setView(center, 10);
map.once('zoomend', function() {
map.once('zoomend', function () {
expect(map.getZoom()).to.eql(10.25);
expect(map.getCenter()).to.eql(center);
done();
@ -703,7 +703,7 @@ describe("Map", function () {
it('zoomOut snaps to zoomSnap on any3d browsers', function (done) {
map.options.zoomSnap = 0.25;
map.setView(center, 10);
map.once('zoomend', function() {
map.once('zoomend', function () {
expect(map.getZoom()).to.eql(9.75);
expect(map.getCenter()).to.eql(center);
done();
@ -726,12 +726,12 @@ describe("Map", function () {
map.setView(center, 10);
});
afterEach(function() {
afterEach(function () {
document.body.removeChild(map.getContainer());
});
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.getCenter().equals(boundsCenter, 0.05)).to.eql(true);
done();
@ -742,7 +742,7 @@ describe("Map", function () {
it('Snaps zoom to zoomSnap on any3d browsers', function (done) {
map.options.zoomSnap = 0.25;
L.Browser.any3d = true;
map.once('zoomend', function() {
map.once('zoomend', function () {
expect(map.getZoom()).to.eql(2.75);
expect(map.getCenter().equals(boundsCenter, 0.05)).to.eql(true);
done();
@ -753,7 +753,7 @@ describe("Map", function () {
it('Ignores zoomSnap on non-any3d browsers', function (done) {
map.options.zoomSnap = 0.25;
L.Browser.any3d = false;
map.once('zoomend', function() {
map.once('zoomend', function () {
expect(map.getZoom()).to.eql(2);
expect(map.getCenter().equals(boundsCenter, 0.05)).to.eql(true);
done();

View File

@ -577,7 +577,7 @@ L.Map = L.Evented.extend({
return this.fire('moveend');
},
_stop: function() {
_stop: function () {
L.Util.cancelAnimFrame(this._flyToFrame);
if (this._panAnim) {
this._panAnim.stop();