diff --git a/partials/GridEditor.vue b/partials/GridEditor.vue index 214954775da22dc94df07f3708a8bca4f5d19e58..74b44370f47024b297ba9d68e333e7ab2fb37472 100644 --- a/partials/GridEditor.vue +++ b/partials/GridEditor.vue @@ -437,8 +437,10 @@ }, watch: { 'cellHandler.move.gridPosition': { - handler: function (val) { - console.log('col --->', val) + handler: function (obj) { + if (this.showEditingCells) { + this.mobileCellMove(this.mobileSelectedCell, obj.column, obj.row) + } }, deep: true }, @@ -734,17 +736,21 @@ let cellType = cell.component this.selectedCell.type = cellType.substr(4, cellType.length - 4) }, - async mobileCellMove (annotation, _x, _y) { - this.$el.scrollLeft = this.$el.scrollLeft + (this.gridDimensions.full.cell.width * _x) + // async mobileCellMove (annotation, _x, _y) { + async mobileCellMove (annotation, x, y) { + // this.$el.scrollLeft = this.$el.scrollLeft + (this.gridDimensions.full.cell.width * _x) let - parsed = annotation.target.selector.parse(), + parsed = annotation.target.selector.parse() + /* sliced = parsed.xywh.slice(0, 4), x = sliced[0], y = sliced[1], w = sliced[2], h = sliced[3] + */ + /* // ----- x if (_x === -1) if (x > 1) x += _x if (_x === 1 && x < this.grid.config.columns - w + 1) x += _x @@ -752,6 +758,7 @@ // ----- y if (_y === -1) if (y > 1) y += _y if (_y === 1 && y < this.grid.config.rows - h + 1) y += _y + */ // x += _x // y += _y