diff options
| author | Terry Truong <terry06890@gmail.com> | 2022-06-20 23:24:05 +1000 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2022-06-20 23:24:05 +1000 |
| commit | e756c80de1cb67e03988815b847288870714e852 (patch) | |
| tree | 72304333d664fbd1b564cee4c83b7e97e70cad7d | |
| parent | 147bd5aec512964dc4bc34c4f2eb98d7b5d6b5fa (diff) | |
Prevent ancestry-bar scrollbar overlapping content
| -rw-r--r-- | src/components/AncestryBar.vue | 7 |
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(){ |
