mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
faster distance calc
This commit is contained in:
parent
2e9b332012
commit
34f98fb08b
8 changed files with 101 additions and 80 deletions
|
@ -183,7 +183,7 @@ function* locationChangeSaga({ location }: ReturnType<typeof editorLocationChang
|
|||
if (!ready) return;
|
||||
|
||||
yield call(loadMapFromPath);
|
||||
MainMap.fitBounds(MainMap.getVisibleBounds(), { animate: true });
|
||||
MainMap.fitVisibleBounds({ animate: true });
|
||||
}
|
||||
|
||||
function* keyPressedSaga({ key, target }: ReturnType<typeof editorKeyPressed>) {
|
||||
|
|
|
@ -29,8 +29,7 @@ import {
|
|||
editorSetSave,
|
||||
editorClearAll,
|
||||
} from '~/redux/editor/actions';
|
||||
import { pushLoaderState, getUrlData, pushPath, replacePath } from '~/utils/history';
|
||||
import { searchSetSagaWorker } from '~/redux/user/sagas';
|
||||
import { pushLoaderState, getUrlData, pushPath } from '~/utils/history';
|
||||
import { getStoredMap, postMap } from '~/utils/api';
|
||||
import { Unwrap } from '~/utils/middleware';
|
||||
import { selectMap, selectMapProvider } from './selectors';
|
||||
|
@ -150,7 +149,7 @@ export function* mapInitSaga() {
|
|||
|
||||
yield call(loadMapFromPath);
|
||||
yield call(setReadySaga);
|
||||
MainMap.fitBounds(MainMap.getVisibleBounds(), { animate: false });
|
||||
MainMap.fitVisibleBounds({ animate: false });
|
||||
pushLoaderState(100);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue