Commit 3347d83b authored by christianrhansen's avatar christianrhansen

clean-up handleResizeCell()

parent 888d8f26
Pipeline #20285 passed with stage
in 1 minute and 32 seconds
......@@ -462,37 +462,32 @@
}
},
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) {
......
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