Poprawiono szlaki; poprawiono UX dla widoku scenerii

This commit is contained in:
2022-03-05 20:25:37 +01:00
parent c9d0a674e4
commit ac76454173
8 changed files with 117 additions and 92 deletions
+6 -6
View File
@@ -30,12 +30,12 @@ const routes: Array<RouteRecordRaw> = [
]
const router = createRouter({
scrollBehavior(to, from, savedPosition) {
if (savedPosition) {
return savedPosition;
} else {
return { top: 0, left: 0 };
}
scrollBehavior(to, from) {
if (to.name == "SceneryView")
return { el: `.app_main` };
if (from.name == "SceneryView" && to.name == "StationsView")
return { el: `.last-selected`, top: 20 }
},
history: createWebHistory(),