mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
new-poly: its finally working
This commit is contained in:
parent
34f99771b1
commit
aab1ee18b8
2 changed files with 89 additions and 80 deletions
|
@ -33,6 +33,7 @@ export class NewPoly {
|
|||
onMarkerDragEnd: this.updateMarks,
|
||||
onPointAdded: this.updateMarks,
|
||||
onPointDropped: this.updateMarks,
|
||||
onContinueDrawing: this.setModeOnDrawing,
|
||||
|
||||
onMarkersHide: () => console.log('all markers are hidden'),
|
||||
onMarkersShow: () => console.log('all markers are visible'),
|
||||
|
@ -53,6 +54,9 @@ export class NewPoly {
|
|||
this.arrows = new L.LayerGroup().addTo(map);
|
||||
}
|
||||
|
||||
setModeOnDrawing = () => {
|
||||
if (this.editor.getMode() !== MODES.POLY) this.editor.setMode(MODES.POLY);
|
||||
};
|
||||
|
||||
drawArrows = () => {
|
||||
this.arrows.clearLayers();
|
||||
|
@ -80,8 +84,8 @@ export class NewPoly {
|
|||
});
|
||||
};
|
||||
|
||||
updateMarks = (e) => {
|
||||
// console.log('upd', e);
|
||||
updateMarks = (e, callee) => {
|
||||
console.log('upd', callee);
|
||||
// return;
|
||||
const coords = this.poly.toGeoJSON().geometry.coordinates;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue