Commit a0531654 authored by christianrhansen's avatar christianrhansen

new cell needs confirmation befor added to grid now (still some bugs)

parent 3a00b3ec
Pipeline #16727 passed with stage
in 5 minutes and 48 seconds
......@@ -103,7 +103,12 @@
cell(:cell="tmpCell")
//----- temporary cell (mobile)
.cell-item.cell-item-tmp-mobile(v-if="mobileTempCell.show && cachedNewCell", :style="mobileTempCellStyle(mobileTempCell)")
.cell-item.cell-item-tmp-mobile.row.justify-center.items-center(
v-if="mobileTempCell.show && cachedNewCell", :style="mobileTempCellStyle(mobileTempCell)")
q-btn.bg-dark.text-white.q-mr-sm(@click="event => {addMobileCell(event)}", round, flat)
q-icon(name="check")
q-btn.bg-dark.text-white(@click="clearTempCell()", round, flat)
q-icon(name="clear")
// cell(:cell="tmpCell")
// ---------------------------------------------------------------------------------------------------------------
......@@ -246,7 +251,7 @@
mobileSelectedCell: undefined,
touch: {position: {top: undefined, left: undefined}},
isMobile: this.$q.platform.is.mobile,
mobileTempCell: {x: 0, y: 0, width: 1, height: 1, show: false}
mobileTempCell: {x: 0, y: 0, width: 1, height: 1, show: false, isSet: false}
}
},
computed: {
......@@ -324,9 +329,12 @@
}
},
methods: {
clearTempCell () {
this.mobileTempCell = {x: undefined, y: undefined, width: undefined, height: undefined, isSet: false}
},
panGrid (obj) {
if (this.cachedNewCell) {
console.log('hhhhhhhhhhhhhhhhh', obj)
if (this.cachedNewCell && !this.mobileTempCell.isSet) {
// console.log('hhhhhhhhhhhhhhhhh', obj)
let res = this.getGridPositionForEvent(obj)
if (obj.isFirst) {
......@@ -339,8 +347,9 @@
this.mobileTempCell.height = res.y - this.mobileTempCell.y + 1
if (obj.isFinal) {
this.addMobileCell(obj)
this.mobileTempCell.show = false
this.mobileTempCell.isSet = true
// this.addMobileCell(obj)
// this.mobileTempCell.show = false
}
}
},
......@@ -618,7 +627,7 @@
this.tmpObjects = []
event.preventDefault()
}
this.mobileTempCell = {x: undefined, y: undefined, width: undefined, height: undefined}
this.clearTempCell()
},
//
......
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