mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
poprawki scrollBehavior
This commit is contained in:
+1
-1
@@ -31,7 +31,7 @@
|
||||
// CONTAINER
|
||||
.app_container {
|
||||
display: grid;
|
||||
grid-template-rows: auto 1fr auto;
|
||||
grid-template-rows: auto minmax(100vh, 1fr) auto;
|
||||
grid-template-columns: 100%;
|
||||
|
||||
min-height: 100vh;
|
||||
|
||||
+1
-3
@@ -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
|
||||
|
||||
@@ -201,8 +201,6 @@ button.back-btn {
|
||||
&-view {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
&-offline {
|
||||
@@ -231,6 +229,7 @@ button.back-btn {
|
||||
|
||||
width: 100%;
|
||||
max-width: 1700px;
|
||||
min-height: 100vh;
|
||||
|
||||
margin: 1rem 0;
|
||||
text-align: center;
|
||||
|
||||
Reference in New Issue
Block a user