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 -1
View File
@@ -31,7 +31,7 @@
// CONTAINER // CONTAINER
.app_container { .app_container {
display: grid; display: grid;
grid-template-rows: auto 1fr auto; grid-template-rows: auto minmax(100vh, 1fr) auto;
grid-template-columns: 100%; grid-template-columns: 100%;
min-height: 100vh; min-height: 100vh;
+1 -3
View File
@@ -61,12 +61,10 @@ const routes: Array<RouteRecordRaw> = [
const router = createRouter({ const router = createRouter({
scrollBehavior(to, from, savedPosition) { 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` }; return { el: `.app_main` };
if (savedPosition) return savedPosition; if (savedPosition) return savedPosition;
// if (from.name == 'SceneryView' && to.name == 'StationsView') return { el: `.last-selected`, top: 20 };
}, },
history: createWebHistory(), history: createWebHistory(),
routes routes
+1 -2
View File
@@ -201,8 +201,6 @@ button.back-btn {
&-view { &-view {
display: flex; display: flex;
justify-content: center; justify-content: center;
min-height: 100vh;
} }
&-offline { &-offline {
@@ -231,6 +229,7 @@ button.back-btn {
width: 100%; width: 100%;
max-width: 1700px; max-width: 1700px;
min-height: 100vh;
margin: 1rem 0; margin: 1rem 0;
text-align: center; text-align: center;