Commit 2853b20e authored by christianrhansen's avatar christianrhansen

mobile: watching datasets from move- and resize-handler (buggy)

parent 7bc46d2b
Pipeline #17398 passed with stage
in 1 minute and 22 seconds
......@@ -148,6 +148,7 @@
.handler-new-cell.move.absolute.text-dark.justify-center.row.bg-white.shadow-6(
v-intersection-observer,
ref="move",
:data-left="getHandlerPosition('move')",
v-touch-pan="handleMoveCell", round, flat,
:style="{left: handlerNewCell.move.x - 20 + 'px', top: handlerNewCell.move.y - 20 + 'px'}",
:class="[{'pushed': !handlerNewCell.move.pushed}]")
......@@ -165,7 +166,9 @@
//----- (main)
// v-if="mobileTempCell.onGrid && !handlerNewCell.move.pushed",
.handler-new-cell.resize.absolute.text-dark.justify-center.row.bg-white.shadow-6(
ref="resize",
v-intersection-observer,
:data-left="getHandlerPosition('resize')",
v-touch-pan="handleResizeCell", round, flat,
:style="{left: handlerNewCell.resize.x - 20 + 'px', top: handlerNewCell.resize.y - 20 + 'px'}",
:class="{'pushed': !handlerNewCell.resize.pushed}")
......@@ -326,7 +329,7 @@
// cursor: {x: undefined, y: undefined},
handlerNewCell: {
size: {width: 40, height: 40},
move: {x: 20, y: undefined, pushed: false, pos: undefined, inViewport: undefined, onLeft: undefined, onRight: undefined},
move: {x: 20, y: undefined, pushed: false, pos: undefined, inViewport: undefined, onLeft: undefined, onRight: undefined, dataLeft: undefined},
resize: {x: undefined, y: undefined, pushed: false, pos: undefined}
},
handlerNewCellTemp: {visibility: true, left: 0}
......@@ -385,6 +388,11 @@
async mounted () {
await this.fetchData()
this.resetScrollPosition()
// this.handlerNewCell.move.dataLeft = this.$refs.move.getAttribute('data-left')
// console.log(this.handlerNewCell.move.dataLeft)
// this.testMove = this.$refs.move.getAttribute('data-left')
/*
let options = {
......@@ -448,6 +456,10 @@
}
},
methods: {
getHandlerPosition (val) {
if (val === 'move' && this.$refs.move) console.log('move', this.$refs.move.dataset.left)
if (val === 'resize' && this.$refs.resize) console.log('resize', this.$refs.resize.dataset.left)
},
// observerCallback (entries, observer) {
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