...
 
Commits (2)
......@@ -467,9 +467,6 @@
resizeHandler = this.cellHandler.resize,
tempCell = this.mobileTempCell
resizeHandler.gridPosition.row = pos.y
resizeHandler.gridPosition.column = pos.x
if (obj.isFirst) {
this.activeHandler = true
tempCell.show = true
......@@ -481,6 +478,8 @@
resizeHandler.x = pos.ox
resizeHandler.y = pos.oy
resizeHandler.gridPosition.row = pos.y
resizeHandler.gridPosition.column = pos.x
if (obj.isFinal) {
this.activeHandler = false
......@@ -500,27 +499,30 @@
},
panGrid (obj) {
if (this.cachedNewCell && !this.mobileTempCell.onGrid) {
// console.log('hhhhhhhhhhhhhhhhh', obj)
let res = this.getGridPositionForEvent(obj)
let
pos = this.getGridPositionForEvent(obj),
fullCell = this.gridDimensions.full.cell,
tempCell = this.mobileTempCell,
moveHandler = this.cellHandler.move,
resizeHandler = this.cellHandler.resize
if (obj.isFirst) {
this.mobileTempCell.show = true
this.mobileTempCell.x = res.x
this.mobileTempCell.y = res.y
tempCell.show = true
tempCell.x = pos.x
tempCell.y = pos.y
}
this.mobileTempCell.width = res.x - this.mobileTempCell.x + 1
this.mobileTempCell.height = res.y - this.mobileTempCell.y + 1
tempCell.width = pos.x - tempCell.x + 1
tempCell.height = pos.y - tempCell.y + 1
if (obj.isFinal) {
this.mobileTempCell.onGrid = true
// this.addMobileCell(obj)
// this.mobileTempCell.show = false
this.cellHandler.move.x = this.gridDimensions.full.cell.width * (this.mobileTempCell.x - 1) + 8 + 20
this.cellHandler.move.y = this.gridDimensions.full.cell.height * (this.mobileTempCell.y - 1) + 8 + 20
this.cellHandler.resize.x = this.gridDimensions.full.cell.width * res.x - 8 - 20
this.cellHandler.resize.y = this.gridDimensions.full.cell.height * res.y - 8 - 20
tempCell.onGrid = true
moveHandler.x = fullCell.width * (tempCell.x - 1) + 8 + 20
moveHandler.y = fullCell.height * (tempCell.y - 1) + 8 + 20
resizeHandler.x = fullCell.width * pos.x - 8 - 20
resizeHandler.y = fullCell.height * pos.y - 8 - 20
}
}
},
......