_flat is now a static method

This commit is contained in:
Yohan Boniface 2015-05-08 13:11:58 +02:00
parent 8b97b905e8
commit 2408cf2bb6
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ describe('Polygon', function () {
var polygon = new L.Polygon(latLngs);
expect(polygon._flat(polygon._latlngs)).to.be(false);
expect(L.Polyline._flat(polygon._latlngs)).to.be(false);
expect(polygon.getLatLngs()).to.eql(polygon._latlngs);
});

View File

@ -51,7 +51,7 @@ L.Polygon = L.Polyline.extend({
_setLatLngs: function (latlngs) {
L.Polyline.prototype._setLatLngs.call(this, latlngs);
if (this._flat(this._latlngs)) {
if (L.Polyline._flat(this._latlngs)) {
this._latlngs = [this._latlngs];
}
},