diff --git a/src/components/maps/RouteRow.jsx b/src/components/maps/RouteRow.jsx index 3c4c988..00e1c95 100644 --- a/src/components/maps/RouteRow.jsx +++ b/src/components/maps/RouteRow.jsx @@ -26,13 +26,10 @@ export const RouteRow = ({ {_id} - -
{(distance && `${distance} km`) || '0 km'}
- ); diff --git a/src/components/panels/EditorPanel.jsx b/src/components/panels/EditorPanel.jsx index adc0a94..d155f7c 100644 --- a/src/components/panels/EditorPanel.jsx +++ b/src/components/panels/EditorPanel.jsx @@ -13,22 +13,16 @@ import { setMode, startEditing, stopEditing, setLogo, takeAShot } from '$redux/u import type { UserType } from '$constants/types'; type Props = { - user: UserType, editing: false, mode: String, changed: Boolean, distance: Number, - title: String, - address: String, logo: String, - routerPoints: Number, - activeSticker: String, estimated: Number, // todo: implement! setMode: Function, startEditing: Function, stopEditing: Function, - setLogo: Function, takeAShot: Function, } diff --git a/src/redux/user/sagas.js b/src/redux/user/sagas.js index 87f75f6..021f215 100644 --- a/src/redux/user/sagas.js +++ b/src/redux/user/sagas.js @@ -90,8 +90,11 @@ function* loadMapSaga(path) { const map = yield call(getStoredMap, { name: path }); if (map) { + yield editor.clearAll(); yield editor.setData(map); yield editor.fitDrawing(); + yield editor.setInitialData(); + yield put(setChanged(false)); } diff --git a/src/styles/dialogs.less b/src/styles/dialogs.less index 4d92539..19da2df 100644 --- a/src/styles/dialogs.less +++ b/src/styles/dialogs.less @@ -58,6 +58,8 @@ font-size: 0.9em; opacity: 0.3; margin-bottom: 5px; + display: grid; + grid-template-columns: 2fr 1fr 1fr; svg { width: 20px;