aboutsummaryrefslogtreecommitdiff
path: root/src/components/AncestryBar.vue
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-06-20 23:24:05 +1000
committerTerry Truong <terry06890@gmail.com>2022-06-20 23:24:05 +1000
commite756c80de1cb67e03988815b847288870714e852 (patch)
tree72304333d664fbd1b564cee4c83b7e97e70cad7d /src/components/AncestryBar.vue
parent147bd5aec512964dc4bc34c4f2eb98d7b5d6b5fa (diff)
Prevent ancestry-bar scrollbar overlapping content
Diffstat (limited to 'src/components/AncestryBar.vue')
-rw-r--r--src/components/AncestryBar.vue7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/components/AncestryBar.vue b/src/components/AncestryBar.vue
index a56568c..497c11c 100644
--- a/src/components/AncestryBar.vue
+++ b/src/components/AncestryBar.vue
@@ -25,9 +25,8 @@ export default defineComponent({
},
styles(): Record<string,string> {
return {
- overflowX: this.vert ? 'hidden' : 'auto',
- overflowY: this.vert ? 'auto' : 'hidden',
- maxHeight: '100vh',
+ overflowX: this.vert ? 'hidden' : 'scroll',
+ overflowY: this.vert ? 'scroll' : 'hidden',
// For child layout
display: 'flex',
flexDirection: this.vert ? 'column' : 'row',
@@ -57,7 +56,7 @@ export default defineComponent({
onWheelEvt(evt: WheelEvent){
// Possibly convert vertical scroll to horizontal
if (!this.vert && Math.abs(evt.deltaX) < Math.abs(evt.deltaY)){
- this.$el.scrollLeft -= (evt.deltaY > 0 ? 30 : -30);
+ this.$el.scrollLeft -= (evt.deltaY > 0 ? -30 : 30);
}
},
scrollToEnd(){