Commit dc3c0ecb authored by Christian Hansen's avatar Christian Hansen Committed by Anton Koch

fixed buggy cell update in mosys (#331)

parent ecf75376
<template lang="pug">
.handler-new-cell.justify-center.row.bg-white(ref="targetHandler")
.cell-handler.justify-center.row.bg-white(ref="targetHandler")
q-btn.text-dark(@click="onDoubleTap", flat, size="sm", no-ripple, style="max-width: 100%;")
slot
</template>
<script>
export default {
props: ['element', 'doubleTap'],
props: ['type', 'doubleTap'],
data () {
return {
clickTimer: null
}
},
mounted () {
if (this.element) {
if (this.type) {
let observer = new IntersectionObserver(this.observerCallback)
observer.observe(this.$refs.targetHandler)
this.observer = observer
......@@ -40,7 +40,7 @@
observerCallback (entries) {
let
target = entries[0],
arg = {element: this.element, intersecting: target.isIntersecting, offsetLeft: undefined}
arg = {type: this.type, intersecting: target.isIntersecting, offsetLeft: undefined}
if (!target.isIntersecting) Object.assign(arg, {offsetLeft: target.boundingClientRect.left})
......@@ -56,14 +56,53 @@
<style scoped lang="stylus">
handler-width = 40px
border-radius-handler = 100vw
gap = 0px
.handler-new-cell
.cell-handler
width handler-width
height handler-width
&.pushed
transition top ease 200ms, left ease 200ms
&.default-handler
position absolute
border-radius border-radius-handler
&.hide
width 0!important
overflow hidden
&.sticked-handler
position fixed
width handler-width
height handler-width
transition opacity ease 350ms
opacity 0
&.hide
width 0!important
overflow hidden
border-right 0!important
&.show
opacity 1
&.left-side
left gap
right auto
border-radius 0 border-radius-handler border-radius-handler 0
&.right-side
left auto
border-radius border-radius-handler 0 0 border-radius-handler
&.mobile
right gap
&.desktop
right calc(100vw / 4)
</style>
<style lang="stylus">
.handler-new-cell
.cell-handler
.q-focus-helper
display none!important
</style>
This diff is collapsed.
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