Commit 53b90597 authored by anton's avatar anton

Read scrollLeft via $refs instead of event target

parent 154f333b
Pipeline #60092 passed with stage
in 6 minutes and 43 seconds
......@@ -79,11 +79,11 @@
this.$q.loading.hide()
},
methods: {
onScroll (val) {
onScroll () {
if (this.$route.query.x) this.$router.push({ query: {} })
if (!this.locked) {
if (val && this.data && this.data.grid) {
this.$store.commit('mosys/setScrollConfig', [this.data.grid.id, val.originalTarget.scrollLeft])
if (this.$refs.gridContainer && this.data && this.data.grid) {
this.$store.commit('mosys/setScrollConfig', [this.data.grid.id, this.$refs.gridContainer.scrollLeft])
}
}
},
......
<template lang="pug">
div.cell-grid-container.bg-dark.scroll(style="overflow-y: hidden; scroll-behavior: smooth;" @scroll="onScroll")
div.cell-grid-container.bg-dark.scroll(ref="gridContainer" style="overflow-y: hidden; scroll-behavior: smooth;" @scroll="onScroll")
q-window-resize-observable(@resize="updateGridDimensions")
//----- modal for existing cell editing
......@@ -420,9 +420,9 @@
document.removeEventListener('mousemove', this.mouseMoveListener)
},
methods: {
onScroll (val) {
if (val && this.data && this.data.grid) {
this.$store.commit('mosys/setScrollConfig', [this.data.grid.id, val.originalTarget.scrollLeft])
onScroll () {
if (this.$refs.gridContainer && this.data && this.data.grid) {
this.$store.commit('mosys/setScrollConfig', [this.data.grid.id, this.$refs.gridContainer.scrollLeft])
}
},
toggleAxis () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment