added notifications for hidden markers

This commit is contained in:
muerwre 2019-02-11 16:42:52 +07:00
parent 32e1b4c3fd
commit ba5e24a56d
12 changed files with 89 additions and 19 deletions

View file

@ -20,7 +20,7 @@ export class NewPoly {
this.poly = L.Polyline.PolylineEditor(coordinates, {
...polyStyle,
maxMarkers: 50,
maxMarkers: 100,
onPointsSet: this.updateMarks,
onMarkerDragEnd: this.updateMarks,
@ -28,8 +28,8 @@ export class NewPoly {
onPointDropped: this.updateMarks,
onContinueDrawing: this.setModeOnDrawing,
onMarkersHide: () => console.log('all markers are hidden'),
onMarkersShow: () => console.log('all markers are visible'),
onMarkersHide: () => editor.setMarkersShown(false),
onMarkersShow: () => editor.setMarkersShown(true),
}).addTo(map);
this.poly.addTo(map);