router spinner

This commit is contained in:
muerwre 2019-03-05 17:55:05 +07:00
parent 663890dca6
commit 9adc93b3cc
8 changed files with 70 additions and 17 deletions

View file

@ -14,7 +14,7 @@ import {
setAddress,
setChanged,
setDistance,
setIsEmpty,
setIsEmpty, setIsRouting,
setLogo,
setMarkersShown,
setMode,
@ -81,9 +81,19 @@ export class Editor {
map, routerMoveStart, lockMapClicks, setDistance: this.setDistance, triggerOnChange, editor: this,
});
this.stickers = new Stickers({ map, lockMapClicks, triggerOnChange, editor: this });
this.stickers = new Stickers({
map,
lockMapClicks,
triggerOnChange,
editor: this
});
this.router = new Router({
map, lockMapClicks, setRouterPoints: this.setRouterPoints, pushPolyPoints
map,
lockMapClicks,
pushPolyPoints,
setRouterPoints: this.setRouterPoints,
setIsRouting: this.setIsRouting,
});
this.switches = {
@ -176,6 +186,7 @@ export class Editor {
setAddress: typeof setAddress = value => store.dispatch(setAddress(value));
setPublic: typeof setPublic = value => store.dispatch(setPublic(value));
setIsEmpty: typeof setIsEmpty = value => store.dispatch(setIsEmpty(value));
setIsRouting: typeof setIsRouting = value => store.dispatch(setIsRouting(value));
setMarkersShown = (value: boolean): void => {
if (this.getState().markers_shown !== value) store.dispatch(setMarkersShown(value));