Commit 774406b7 authored by christianrhansen's avatar christianrhansen

mobile: moved "undo position on grid"-button into "new cell helper"-bar

parent 59de1401
......@@ -21,6 +21,9 @@
q-item-main
| Touch anywhere to place the new cell.
q-item-side
q-btn.bg-transparent.text-white.on-right(@click.native="clearTempCell()", round, flat,
:disabled="!mobileTempCell.onGrid")
q-icon(name="undo")
q-btn.bg-transparent.text-white.on-right(@click.native="$store.commit('mosys/cacheNewCell', undefined)", round, flat)
q-icon(name="delete")
......@@ -113,8 +116,9 @@
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")
//
q-btn.bg-dark.text-white(@click="clearTempCell()", round, flat)
q-icon(name="clear")
// cell(:cell="tmpCell")
// ---------------------------------------------------------------------------------------------------------------
......@@ -257,7 +261,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, isSet: false}
mobileTempCell: {x: 0, y: 0, width: 1, height: 1, show: false, onGrid: false}
}
},
computed: {
......@@ -336,10 +340,10 @@
},
methods: {
clearTempCell () {
this.mobileTempCell = {x: undefined, y: undefined, width: undefined, height: undefined, isSet: false}
this.mobileTempCell = {x: undefined, y: undefined, width: undefined, height: undefined, onGrid: false}
},
panGrid (obj) {
if (this.cachedNewCell && !this.mobileTempCell.isSet) {
if (this.cachedNewCell && !this.mobileTempCell.onGrid) {
// console.log('hhhhhhhhhhhhhhhhh', obj)
let res = this.getGridPositionForEvent(obj)
......@@ -353,7 +357,7 @@
this.mobileTempCell.height = res.y - this.mobileTempCell.y + 1
if (obj.isFinal) {
this.mobileTempCell.isSet = true
this.mobileTempCell.onGrid = true
// this.addMobileCell(obj)
// this.mobileTempCell.show = false
}
......
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