Use getWest/South/East/North instead of getLeft/Bottom/Right/Top
This commit is contained in:
parent
69b925b057
commit
4b5746ffbc
@ -21,30 +21,30 @@ describe('LatLngBounds', function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe('#getLeft', function () {
|
||||
it('should return a proper bbox left value', function() {
|
||||
expect(a.getLeft()).toEqual(12);
|
||||
describe('#getWest', function () {
|
||||
it('should return a proper bbox west value', function() {
|
||||
expect(a.getWest()).toEqual(12);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('#getBottom', function () {
|
||||
it('should return a proper bbox bottom value', function() {
|
||||
expect(a.getBottom()).toEqual(14);
|
||||
describe('#getSouth', function () {
|
||||
it('should return a proper bbox south value', function() {
|
||||
expect(a.getSouth()).toEqual(14);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('#getRight', function () {
|
||||
it('should return a proper bbox right value', function() {
|
||||
expect(a.getRight()).toEqual(40);
|
||||
describe('#getEast', function () {
|
||||
it('should return a proper bbox east value', function() {
|
||||
expect(a.getEast()).toEqual(40);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('#getTop', function () {
|
||||
it('should return a proper bbox top value', function() {
|
||||
expect(a.getTop()).toEqual(30);
|
||||
describe('#getNorth', function () {
|
||||
it('should return a proper bbox north value', function() {
|
||||
expect(a.getNorth()).toEqual(30);
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -73,19 +73,19 @@ L.LatLngBounds.prototype = {
|
||||
return new L.LatLng(this._southWest.lat, this._northEast.lng);
|
||||
},
|
||||
|
||||
getLeft: function () {
|
||||
getWest: function () {
|
||||
return this._southWest.lng;
|
||||
},
|
||||
|
||||
getBottom: function () {
|
||||
getSouth: function () {
|
||||
return this._southWest.lat;
|
||||
},
|
||||
|
||||
getRight: function () {
|
||||
getEast: function () {
|
||||
return this._northEast.lng;
|
||||
},
|
||||
|
||||
getTop: function () {
|
||||
getNorth: function () {
|
||||
return this._northEast.lat;
|
||||
},
|
||||
|
||||
@ -126,7 +126,7 @@ L.LatLngBounds.prototype = {
|
||||
},
|
||||
|
||||
toBBoxString: function () {
|
||||
return [this.getLeft(), this.getBottom(), this.getRight(), this.getTop()].join(',');
|
||||
return [this.getWest(), this.getSouth(), this.getEast(), this.getNorth()].join(',');
|
||||
},
|
||||
|
||||
equals: function (bounds) { // (LatLngBounds)
|
||||
|
Loading…
Reference in New Issue
Block a user