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 @@
strong {{ selectedCell.type }}
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-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)
q-icon(name="delete")
......@@ -110,6 +110,7 @@
v-touch-hold="event => {handleCellInfoTouch(event, annotation)}",
@click.prevent="event => {touchMobileCell(event, annotation)}")
//
q-btn.absolute-top-right.text-dark.q-pa-none.q-mr-xs(
v-if="showEditingCells",
@click.prevent="event => {handleCellInfoTouch(event, annotation)}",
......@@ -372,7 +373,7 @@
move: {left: undefined, intersectingMainHandler: false, side: undefined},
resize: {left: undefined, intersectingMainHandler: false, side: undefined}
},
selectedCell: {type: undefined}
selectedCell: {type: undefined, annotation: undefined}
}
},
computed: {
......@@ -590,6 +591,7 @@
this.clearTempCell()
},
handleCellInfoTouch (event, annotation) {
console.log('handleCellInfoTouch', annotation)
this.touchMobileCell(event, annotation)
this.handleModal()
},
......@@ -681,7 +683,7 @@
}
},
touchMobileCell (event, cell) {
if (!this.mobileTempCell.onGrid) {
if (!this.mobileTempCell.onGrid && cell) {
Object.keys(this.annotationUIStates).filter((k) => {
if (k === cell._uuid && this.annotationUIStates[k].editing) console.log(k, cell._uuid)
else this.annotationUIStates[k].editing = false
......@@ -693,6 +695,7 @@
}
},
handleCellTouch (event, annotation) {
console.log('handleCellTouch', annotation)
if (!this.cachedNewCell) {
let
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