fixed clearing polyline

This commit is contained in:
muerwre 2019-02-07 11:32:01 +07:00
parent 807bea9ec2
commit a05ebaa4ad
2 changed files with 6 additions and 2 deletions

View file

@ -139,8 +139,8 @@ export class NewPoly {
}; };
clearAll = () => { clearAll = () => {
this.poly.setLatLngs([]); // this.poly.setLatLngs([]);
this.poly.editor.reset(); this.poly.editor.clear();
this.updateMarks(); this.updateMarks();
}; };

View file

@ -112,6 +112,10 @@ L.Polyline.polylineEditor = L.Polyline.extend({
} }
this._reloadPolyline(); this._reloadPolyline();
},
clear: () => {
this.setPoints([]);
} }
}; };