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