Commit 6491beac authored by christianrhansen's avatar christianrhansen

mosys mobile: "edit cell"-button in "selected cell header" only. added functionality.

parent 68136a9d
Pipeline #19983 passed with stage
in 1 minute and 24 seconds
...@@ -33,10 +33,10 @@ ...@@ -33,10 +33,10 @@
strong {{ selectedCell.type }} strong {{ selectedCell.type }}
q-item-side.row q-item-side.row
q-btn.text-white.q-px-sm(@click="", flat) q-btn.text-white.q-px-sm(@click="event => {handleCellInfoTouch(event, selectedCell.annotation)}", flat)
q-icon(name="edit") q-icon(name="edit")
q-btn.text-white.q-px-sm(@click="event => {handleCellContextMenuDelete(event, mobileSelectedCell)}", q-btn.text-white.q-px-sm.on-right.on-left(@click="event => {handleCellContextMenuDelete(event, mobileSelectedCell)}",
flat) flat)
q-icon(name="delete") q-icon(name="delete")
...@@ -110,11 +110,12 @@ ...@@ -110,11 +110,12 @@
v-touch-hold="event => {handleCellInfoTouch(event, annotation)}", v-touch-hold="event => {handleCellInfoTouch(event, annotation)}",
@click.prevent="event => {touchMobileCell(event, annotation)}") @click.prevent="event => {touchMobileCell(event, annotation)}")
q-btn.absolute-top-right.text-dark.q-pa-none.q-mr-xs( //
v-if="showEditingCells", q-btn.absolute-top-right.text-dark.q-pa-none.q-mr-xs(
@click.prevent="event => {handleCellInfoTouch(event, annotation)}", v-if="showEditingCells",
flat, round, size="sm", style="margin-top: 2px;") @click.prevent="event => {handleCellInfoTouch(event, annotation)}",
q-icon(name="edit", size="20px") flat, round, size="sm", style="margin-top: 2px;")
q-icon(name="edit", size="20px")
//----- invisible edit-modal handler //----- invisible edit-modal handler
// //
...@@ -372,7 +373,7 @@ ...@@ -372,7 +373,7 @@
move: {left: undefined, intersectingMainHandler: false, side: undefined}, move: {left: undefined, intersectingMainHandler: false, side: undefined},
resize: {left: undefined, intersectingMainHandler: false, side: undefined} resize: {left: undefined, intersectingMainHandler: false, side: undefined}
}, },
selectedCell: {type: undefined} selectedCell: {type: undefined, annotation: undefined}
} }
}, },
computed: { computed: {
...@@ -590,6 +591,7 @@ ...@@ -590,6 +591,7 @@
this.clearTempCell() this.clearTempCell()
}, },
handleCellInfoTouch (event, annotation) { handleCellInfoTouch (event, annotation) {
console.log('handleCellInfoTouch', annotation)
this.touchMobileCell(event, annotation) this.touchMobileCell(event, annotation)
this.handleModal() this.handleModal()
}, },
...@@ -681,7 +683,7 @@ ...@@ -681,7 +683,7 @@
} }
}, },
touchMobileCell (event, cell) { touchMobileCell (event, cell) {
if (!this.mobileTempCell.onGrid) { if (!this.mobileTempCell.onGrid && cell) {
Object.keys(this.annotationUIStates).filter((k) => { Object.keys(this.annotationUIStates).filter((k) => {
if (k === cell._uuid && this.annotationUIStates[k].editing) console.log(k, cell._uuid) if (k === cell._uuid && this.annotationUIStates[k].editing) console.log(k, cell._uuid)
else this.annotationUIStates[k].editing = false else this.annotationUIStates[k].editing = false
...@@ -693,6 +695,7 @@ ...@@ -693,6 +695,7 @@
} }
}, },
handleCellTouch (event, annotation) { handleCellTouch (event, annotation) {
console.log('handleCellTouch', annotation)
if (!this.cachedNewCell) { if (!this.cachedNewCell) {
let let
parsed = annotation.target.selector.parse(), parsed = annotation.target.selector.parse(),
......
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