_flat is now a static method
This commit is contained in:
parent
8b97b905e8
commit
2408cf2bb6
@ -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);
|
||||
});
|
||||
|
||||
|
@ -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];
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user