mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
map_list: fixed setting initial data
This commit is contained in:
parent
0c51dc44df
commit
3d718b5a2c
4 changed files with 5 additions and 9 deletions
|
@ -26,13 +26,10 @@ export const RouteRow = ({
|
||||||
<Icon icon="icon-link-1" />
|
<Icon icon="icon-link-1" />
|
||||||
{_id}
|
{_id}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
|
||||||
<div className="route-description">
|
|
||||||
<span>
|
<span>
|
||||||
<Icon icon="icon-cycle-1" />
|
<Icon icon="icon-cycle-1" />
|
||||||
{(distance && `${distance} km`) || '0 km'}
|
{(distance && `${distance} km`) || '0 km'}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -13,22 +13,16 @@ import { setMode, startEditing, stopEditing, setLogo, takeAShot } from '$redux/u
|
||||||
import type { UserType } from '$constants/types';
|
import type { UserType } from '$constants/types';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
user: UserType,
|
|
||||||
editing: false,
|
editing: false,
|
||||||
mode: String,
|
mode: String,
|
||||||
changed: Boolean,
|
changed: Boolean,
|
||||||
distance: Number,
|
distance: Number,
|
||||||
title: String,
|
|
||||||
address: String,
|
|
||||||
logo: String,
|
logo: String,
|
||||||
routerPoints: Number,
|
|
||||||
activeSticker: String,
|
|
||||||
estimated: Number, // todo: implement!
|
estimated: Number, // todo: implement!
|
||||||
|
|
||||||
setMode: Function,
|
setMode: Function,
|
||||||
startEditing: Function,
|
startEditing: Function,
|
||||||
stopEditing: Function,
|
stopEditing: Function,
|
||||||
setLogo: Function,
|
|
||||||
takeAShot: Function,
|
takeAShot: Function,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -90,8 +90,11 @@ function* loadMapSaga(path) {
|
||||||
const map = yield call(getStoredMap, { name: path });
|
const map = yield call(getStoredMap, { name: path });
|
||||||
|
|
||||||
if (map) {
|
if (map) {
|
||||||
|
yield editor.clearAll();
|
||||||
yield editor.setData(map);
|
yield editor.setData(map);
|
||||||
yield editor.fitDrawing();
|
yield editor.fitDrawing();
|
||||||
|
yield editor.setInitialData();
|
||||||
|
|
||||||
yield put(setChanged(false));
|
yield put(setChanged(false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,8 @@
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
opacity: 0.3;
|
opacity: 0.3;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 2fr 1fr 1fr;
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
width: 20px;
|
width: 20px;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue