...
 
Commits (2)
......@@ -249,8 +249,6 @@
mobileTempCell: {
x: 0,
y: 0,
ox: 0,
oy: 0,
width: 1,
height: 1,
left: 0,
......@@ -433,74 +431,63 @@
}
},
handleMoveCell (obj) {
this.cellHandler.move.x = obj.position.left
this.cellHandler.move.y = obj.position.top
let res = this.getGridPositionForEvent(obj)
this.cellHandler.move.gridPosition.row = res.y
this.cellHandler.move.gridPosition.column = res.x
let
pos = this.getGridPositionForEvent(obj),
fullCell = this.gridDimensions.full.cell,
moveHandler = this.cellHandler.move,
tempCell = this.mobileTempCell
if (obj.isFirst) {
this.activeHandler = true
this.mobileTempCell.show = true
this.cellHandler.move.pushed = true
tempCell.show = true
moveHandler.pushed = true
}
this.mobileTempCell.x = res.x
this.mobileTempCell.y = res.y
tempCell.x = pos.x
tempCell.y = pos.y
this.mobileTempCell.ox = res.ox
this.mobileTempCell.oy = res.oy
this.cellHandler.move.x = res.ox
this.cellHandler.move.y = res.oy
moveHandler.x = pos.ox
moveHandler.y = pos.oy
moveHandler.gridPosition.row = pos.y
moveHandler.gridPosition.column = pos.x
if (obj.isFinal) {
this.activeHandler = false
this.mobileTempCell.onGrid = true
this.mobileTempCell.left = this.gridDimensions.full.cell.width * (res.x - 1)
this.cellHandler.move.pushed = false
// this.cellHandler.move.y = this.gridDimensions.full.cell.height * (res.y - 1) + 8 + 59 + 20
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 + this.mobileTempCell.width - 1) - 8 - 20
this.cellHandler.resize.y = this.gridDimensions.full.cell.height * (res.y + this.mobileTempCell.height - 1) - 8 - 20
tempCell.onGrid = true
moveHandler.pushed = false
moveHandler.x = fullCell.width * (tempCell.x - 1) + 8 + 20
moveHandler.y = fullCell.height * (tempCell.y - 1) + 8 + 20
this.cellHandler.resize.x = fullCell.width * (pos.x + tempCell.width - 1) - 8 - 20
this.cellHandler.resize.y = fullCell.height * (pos.y + tempCell.height - 1) - 8 - 20
}
},
handleResizeCell (obj) {
// this.cursor = {x: obj.position.left, y: obj.position.top}
// this.cellHandler.resize = {x: obj.position.left, y: obj.position.top}
this.cellHandler.resize.x = obj.position.left
this.cellHandler.resize.y = obj.position.top
// ---> panGrid
let res = this.getGridPositionForEvent(obj)
let
pos = this.getGridPositionForEvent(obj),
resizeHandler = this.cellHandler.resize,
tempCell = this.mobileTempCell
this.cellHandler.resize.gridPosition.row = res.y
this.cellHandler.resize.gridPosition.column = res.x
resizeHandler.gridPosition.row = pos.y
resizeHandler.gridPosition.column = pos.x
if (obj.isFirst) {
this.activeHandler = true
this.mobileTempCell.show = true
this.cellHandler.resize.pushed = true
tempCell.show = true
resizeHandler.pushed = true
}
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
this.cellHandler.resize.x = res.ox
this.cellHandler.resize.y = res.oy
resizeHandler.x = pos.ox
resizeHandler.y = pos.oy
if (obj.isFinal) {
this.activeHandler = false
this.mobileTempCell.onGrid = true
this.cellHandler.resize.pushed = false
// this.addMobileCell(obj)
// this.mobileTempCell.show = false
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
resizeHandler.pushed = false
resizeHandler.x = this.gridDimensions.full.cell.width * pos.x - 8 - 20
resizeHandler.y = this.gridDimensions.full.cell.height * pos.y - 8 - 20
}
},
handleCellEdit (event, annotation) {
......