mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-24 18:46:40 +07:00
fixed dialog wrong appearance at disabled editor
This commit is contained in:
parent
80120eb37b
commit
72c6b99f58
1 changed files with 7 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
|||
import { call, put, takeEvery, takeLatest, select, race } from 'redux-saga/effects';
|
||||
import { delay, SagaIterator } from 'redux-saga';
|
||||
import { selectEditor } from '~/redux/editor/selectors';
|
||||
import { selectEditor, selectEditorMode } from '~/redux/editor/selectors';
|
||||
import { simplify } from '~/utils/simplify';
|
||||
import {
|
||||
editorHideRenderer,
|
||||
|
@ -177,6 +177,12 @@ function* locationChangeSaga({ location }: ReturnType<typeof editorLocationChang
|
|||
|
||||
if (!ready) return;
|
||||
|
||||
const mode: ReturnType<typeof selectEditorMode> = yield select(selectEditorMode);
|
||||
|
||||
if (mode !== MODES.NONE) {
|
||||
yield put(editorSetMode(MODES.NONE));
|
||||
}
|
||||
|
||||
yield call(loadMapFromPath);
|
||||
MainMap.fitVisibleBounds({ animate: true });
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue