Commit d807234b authored by christianrhansen's avatar christianrhansen

mosys mobile: dynamic "selected cell header"-label

parent 8dc6f057
Pipeline #19913 passed with stage
in 1 minute and 30 seconds
......@@ -39,7 +39,7 @@
#selected-cell-header.fixed-top.z-top.bg-dark.text-white.transition(:class="{'show': showEditingCells}")
q-item.q-pl-md.q-pr-xs.q-py-none.full-height
q-item-main
| Edit cell
| {{ selectedCell.type }}
q-item-side
q-btn.bg-transparent.text-white.on-right(@click="event => {handleCellContextMenuDelete(event, mobileSelectedCell)}", round, flat)
q-icon(name="delete")
......@@ -354,7 +354,8 @@
tempHandler: {
move: {left: undefined, intersectingMainHandler: false, side: undefined},
resize: {left: undefined, intersectingMainHandler: false, side: undefined}
}
},
selectedCell: {type: undefined}
}
},
computed: {
......@@ -677,10 +678,15 @@
},
handleCellTouch (event, annotation) {
if (!this.cachedNewCell) {
console.log(event, annotation)
this.mobileSelectedCell = annotation
this.getCellType(annotation)
}
},
async getCellType (annotation) {
let cell = await this.$store.dispatch('cells/get', annotation.body.source.id)
let cellType = cell.component
this.selectedCell.type = cellType.substr(4, cellType.length - 4)
},
async mobileCellMove (annotation, _x, _y) {
this.$el.scrollLeft = this.$el.scrollLeft + (this.gridDimensions.full.cell.width * _x)
......
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