poprawki scrollBehavior

This commit is contained in:
2023-12-08 18:55:06 +01:00
parent e23663ed28
commit e2b42d16a4
3 changed files with 3 additions and 6 deletions
+1 -3
View File
@@ -61,12 +61,10 @@ const routes: Array<RouteRecordRaw> = [
const router = createRouter({
scrollBehavior(to, from, savedPosition) {
if (to.name == 'SceneryView' && from.name && from.query['view'] === undefined)
if (to.name == 'SceneryView' && from.name !== to.name && from.query['view'] === undefined)
return { el: `.app_main` };
if (savedPosition) return savedPosition;
// if (from.name == 'SceneryView' && to.name == 'StationsView') return { el: `.last-selected`, top: 20 };
},
history: createWebHistory(),
routes