Commit 4dc79396 authored by christianrhansen's avatar christianrhansen

mosys mobile: handler positioning to selected cell

parent 7a98bf31
Pipeline #19928 passed with stage
in 5 minutes and 10 seconds
...@@ -135,10 +135,8 @@ ...@@ -135,10 +135,8 @@
cell(:cell="tmpCell") cell(:cell="tmpCell")
//-------------------------------------------------------------------------------------- temporary cell (mobile) //-------------------------------------------------------------------------------------- temporary cell (mobile)
// template
template(v-if="mobileTempCell.show && cachedNewCell") template(v-if="mobileTempCell.show && cachedNewCell")
//----- cell
.cell-item.cell-item-tmp-mobile.row.justify-center.items-center( .cell-item.cell-item-tmp-mobile.row.justify-center.items-center(
ref="_mobileTempCell", ref="_mobileTempCell",
:style="mobileTempCellStyle(mobileTempCell)") :style="mobileTempCellStyle(mobileTempCell)")
...@@ -675,6 +673,20 @@ ...@@ -675,6 +673,20 @@
}, },
handleCellTouch (event, annotation) { handleCellTouch (event, annotation) {
if (!this.cachedNewCell) { if (!this.cachedNewCell) {
let
parsed = annotation.target.selector.parse(),
sliced = parsed.xywh.slice(0, 4),
x = sliced[0],
y = sliced[1],
w = sliced[2],
h = sliced[3]
this.cellHandler.move.x = this.gridDimensions.full.cell.width * (x - 1) + 8 + 20
this.cellHandler.move.y = this.gridDimensions.full.cell.height * (y - 1) + 8 + 20
this.cellHandler.resize.x = this.gridDimensions.full.cell.width * (x + w - 1) - 8 - 20
this.cellHandler.resize.y = this.gridDimensions.full.cell.height * (y + h - 1) - 8 - 20
this.mobileSelectedCell = annotation this.mobileSelectedCell = annotation
this.getCellType(annotation) this.getCellType(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