mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
fixed clearing polyline
This commit is contained in:
parent
807bea9ec2
commit
a05ebaa4ad
2 changed files with 6 additions and 2 deletions
|
@ -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();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -112,6 +112,10 @@ L.Polyline.polylineEditor = L.Polyline.extend({
|
||||||
}
|
}
|
||||||
|
|
||||||
this._reloadPolyline();
|
this._reloadPolyline();
|
||||||
|
},
|
||||||
|
|
||||||
|
clear: () => {
|
||||||
|
this.setPoints([]);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue