Commit cdbad91d authored by christianrhansen's avatar christianrhansen

mosys mobile: jump to selected cell when tapping temp move-handler (buggy)

parent ac39dc91
Pipeline #19822 passed with stage
in 11 minutes and 33 seconds
<template lang="pug">
.handler-new-cell.text-dark.justify-center.row.bg-grey-3.shadow-2(ref="targetHandler")
slot
q-btn(@click="onDoubleTap", flat, round, size="sm", no-ripple)
slot
</template>
<script>
export default {
props: ['element'],
props: ['element', 'doubleTap'],
mounted () {
if (this.element) {
let observer = new IntersectionObserver(this.observerCallback)
......@@ -14,6 +15,9 @@
}
},
methods: {
onDoubleTap () {
if (this.doubleTap) this.doubleTap.el.scrollLeft = this.doubleTap.oLeft - 20
},
observerCallback (entries) {
let target = entries[0]
......
......@@ -157,6 +157,7 @@
//----- (when main move handler is outside of viewport)
cell-handler-mobile.temp-handler(
v-touch-pan="handleMoveCell",
:doubleTap="{el: $el, type: 'scroll', oLeft: mobileTempCell.left}",
:class="[(!mobileTempCell.onGrid || tempHandler.move.intersectingMain || handlerNewCell.resize.pushed || handlerNewCell.move.pushed ? 'hide': 'show'), (tempHandler.move.side === 'left' ? 'left-side' : 'right-side')]",
:style="{top: handlerNewCell.move.y + 59 - 20 + 'px'}",)
q-icon.self-center.rotate-180(name="open_with", size="22px")
......
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