Commit 88ae5822 authored by christianrhansen's avatar christianrhansen

setted up watcher for move handler's position in grid

parent 6df112bd
......@@ -362,7 +362,7 @@
// cursor: {x: undefined, y: undefined},
cellHandler: {
size: {width: 40, height: 40},
move: {x: 20, y: undefined, pushed: false, pos: undefined, inViewport: undefined, onLeft: undefined, onRight: undefined, dataLeft: undefined},
move: {x: 20, y: undefined, gridPosition: {row: undefined, column: undefined}, pushed: false, pos: undefined, inViewport: undefined, onLeft: undefined, onRight: undefined, dataLeft: undefined},
resize: {x: undefined, y: undefined, pushed: false, pos: undefined}
},
tempHandler: {
......@@ -436,6 +436,12 @@
this.observer.disconnect()
},
watch: {
'cellHandler.move.gridPosition': {
handler: function (val) {
console.log('col --->', val)
},
deep: true
},
slide (val) {
let icon
switch (val) {
......@@ -540,6 +546,9 @@
let res = this.getGridPositionForEvent(obj)
this.cellHandler.move.gridPosition.row = res.y
this.cellHandler.move.gridPosition.column = res.x
if (obj.isFirst) {
this.mobileTempCell.show = true
this.mobileTempCell.button = false
......
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