Commit e3e36ea3 authored by christianrhansen's avatar christianrhansen

mosys mobile: jumping on double-tapping (buggy). styling handlers.

parent cdbad91d
Pipeline #19825 passed with stage
in 1 minute and 27 seconds
<template lang="pug">
.handler-new-cell.text-dark.justify-center.row.bg-grey-3.shadow-2(ref="targetHandler")
q-btn(@click="onDoubleTap", flat, round, size="sm", no-ripple)
.handler-new-cell.justify-center.row(ref="targetHandler")
q-btn.text-dark.bg-grey-3.shadow-2(@click="onDoubleTap", flat, size="sm", no-ripple, style="max-width: 100%; border-radius: .5rem;")
slot
</template>
<script>
export default {
props: ['element', 'doubleTap'],
data () {
return {
clickTimer: null
}
},
mounted () {
if (this.element) {
let observer = new IntersectionObserver(this.observerCallback)
......@@ -16,7 +21,21 @@
},
methods: {
onDoubleTap () {
if (this.doubleTap) this.doubleTap.el.scrollLeft = this.doubleTap.oLeft - 20
if (this.doubleTap) {
if (this.clickTimer == null) {
this.clickTimer = setTimeout(function () {
clearTimeout(this.clickTimer)
this.clickTimer = null
// alert('single')
}, 300)
}
else {
clearTimeout(this.clickTimer)
this.clickTimer = null
this.doubleTap.el.scrollLeft = this.doubleTap.oLeft - 20
// alert('double')
}
}
},
observerCallback (entries) {
let target = entries[0]
......
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