Commit 415a6e67 authored by christianrhansen's avatar christianrhansen

mobile: recognizing temp move-button side

parent a52c7fb3
Pipeline #17258 passed with stage
in 27 seconds
......@@ -154,6 +154,7 @@
// q-icon.self-center.rotate-180(name="signal_cellular_4_bar", size="12px", style="margin-top: 2px;")
q-icon.self-center.rotate-180(name="open_with", size="22px")
// dummy move handler
.handler-new-cell.fixed.text-dark.justify-center.row.bg-white.shadow-6(
v-touch-pan="handleMoveCell",
:class="{'dummyButtonHide': !dummyButton.visibility}",
......@@ -397,7 +398,8 @@
*/
let observer = new IntersectionObserver(this.observerCallback)
observer.observe(this.$refs.move)
// observer.observe(this.$refs.move)
observer.observe(this.$refs._mobileTempCell)
this.observer = observer
},
beforeDestroy () {
......@@ -467,19 +469,32 @@
},
// observerCallback (entries, observer) {
observerCallback (entries) {
let btn = entries[0]
console.log(btn)
// if (!_tempCell.isIntersecting) {
if (btn.boundingClientRect.x < this.handlerNewCell.size.width) {
console.log('outside')
let target = entries[0]
let scrollLeft = this.$el.scrollLeft
// console.log(target)
// console.log('scrollLeft', scrollLeft)
// console.log('mobileTempCell distance left', this.mobileTempCell.x * this.gridDimensions.full.cell.width - 1)
// if (target.boundingClientRect.x < this.handlerNewCell.size.width) {
if (!target.isIntersecting) {
// console.log('outside')
// this.handlerNewCell.move.inViewport = false
// this.handlerNewCell.move.x = 20
if (scrollLeft < this.mobileTempCell.x * this.gridDimensions.full.cell.width - 1) {
console.log('--->')
this.dummyButton.left = window.innerWidth - 40
}
if (scrollLeft > this.mobileTempCell.x * this.gridDimensions.full.cell.width) {
console.log('<---')
this.dummyButton.left = 0
}
}
/*
else {
console.log('INSIDE')
// this.handlerNewCell.move.inViewport = true
// this.handlerNewCell.move.x = this.gridDimensions.full.cell.width * (this.mobileTempCell.x - 1) + 8 + 20
}
*/
/*
let entryX = entries[0].boundingClientRect.x
let _handlerNewCell = this.handlerNewCell
......
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