mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
added notifications for hidden markers
This commit is contained in:
parent
32e1b4c3fd
commit
ba5e24a56d
12 changed files with 89 additions and 19 deletions
|
@ -15,7 +15,7 @@ import {
|
|||
setAddress,
|
||||
setChanged,
|
||||
setDistance,
|
||||
setLogo,
|
||||
setLogo, setMarkersShown,
|
||||
setMode,
|
||||
setPublic,
|
||||
setRouterPoints,
|
||||
|
@ -115,6 +115,10 @@ export class Editor {
|
|||
setAddress = value => store.dispatch(setAddress(value));
|
||||
setPublic = value => store.dispatch(setPublic(value));
|
||||
|
||||
setMarkersShown = value => {
|
||||
if (store.getState().user.markers_shown !== value) store.dispatch(setMarkersShown(value));
|
||||
};
|
||||
|
||||
resetSaveDialog = () => store.dispatch(resetSaveDialog());
|
||||
|
||||
setDistance = value => {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue