mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-25 16:25:13 +00:00
enhance(client): snap scroll on deck
This commit is contained in:
parent
2e76fcdf6f
commit
47b6f466ec
1 changed files with 7 additions and 1 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
<div :class="$style.main">
|
||||
<XStatusBars/>
|
||||
<div ref="columnsEl" :class="[$style.columns, deckStore.reactiveState.columnAlign.value]" @contextmenu.self.prevent="onContextmenu">
|
||||
<div ref="columnsEl" :class="[$style.columns, deckStore.reactiveState.columnAlign.value, { [$style.snapScroll]: snapScroll }]" @contextmenu.self.prevent="onContextmenu">
|
||||
<template v-for="ids in layout">
|
||||
<!-- sectionを利用しているのは、deck.vue側でcolumnに対してfirst-of-typeを効かせるため -->
|
||||
<section
|
||||
|
@ -115,6 +115,7 @@ window.addEventListener('resize', () => {
|
|||
isMobile.value = window.innerWidth <= 500;
|
||||
});
|
||||
|
||||
const snapScroll = isMobile;
|
||||
const drawerMenuShowing = ref(false);
|
||||
|
||||
const route = 'TODO';
|
||||
|
@ -297,9 +298,14 @@ async function deleteProfile() {
|
|||
margin-right: auto;
|
||||
}
|
||||
}
|
||||
|
||||
&.snapScroll {
|
||||
scroll-snap-type: x mandatory;
|
||||
}
|
||||
}
|
||||
|
||||
.column {
|
||||
scroll-snap-align: start;
|
||||
flex-shrink: 0;
|
||||
border-right: solid var(--deckDividerThickness) var(--deckDivider);
|
||||
|
||||
|
|
Loading…
Reference in a new issue