Commit 319a9c9c authored by christianrhansen's avatar christianrhansen
Browse files

temp resize handler functionality, not finished

parent 1ad08254
Pipeline #17470 passed with stage
in 31 seconds
...@@ -160,8 +160,8 @@ ...@@ -160,8 +160,8 @@
//----- (when main move handler is outside of viewport) //----- (when main move handler is outside of viewport)
.handler-new-cell.temp.fixed.text-dark.justify-center.row.bg-white.shadow-6( .handler-new-cell.temp.fixed.text-dark.justify-center.row.bg-white.shadow-6(
v-touch-pan="handleMoveCell", v-touch-pan="handleMoveCell",
:class="[!handlerNewCellTemp.visibility ? 'temp-hide': 'temp-show']", :class="[tempHandler.move.visibility ? 'temp-hide': 'temp-show']",
:style="{left: handlerNewCellTemp.left + 'px', top: handlerNewCell.move.y + 59 - 20 + 'px'}",) :style="{left: tempHandler.move.left + 'px', top: handlerNewCell.move.y + 59 - 20 + 'px'}",)
q-icon.self-center.rotate-180(name="open_with", size="22px") q-icon.self-center.rotate-180(name="open_with", size="22px")
//--------------------------------------------------------------------------------------------- resize handler //--------------------------------------------------------------------------------------------- resize handler
...@@ -179,6 +179,14 @@ ...@@ -179,6 +179,14 @@
:class="{'pushed': !handlerNewCell.resize.pushed}") :class="{'pushed': !handlerNewCell.resize.pushed}")
q-icon.self-center(name="signal_cellular_4_bar", size="12px", style="margin-left: -3px;") q-icon.self-center(name="signal_cellular_4_bar", size="12px", style="margin-left: -3px;")
//----- (temp)
//----- (when main resize handler is outside of viewport)
.handler-new-cell.temp.fixed.text-dark.justify-center.row.bg-white.shadow-6(
v-touch-pan="handleResizeCell",
:class="[!tempHandler.resize.visibility ? 'temp-hide': 'temp-show']",
:style="{left: tempHandler.resize.left + 'px', top: handlerNewCell.resize.y + 59 - 20 + 'px'}",)
q-icon.self-center(name="signal_cellular_4_bar", size="12px", style="margin-left: -3px;")
// --------------------------------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------------------------------
template(v-else) template(v-else)
.cell-item(:style="getAnnotationStyle({x:0,y:0,width:1,height:1})", key="cell-grid-resizer") .cell-item(:style="getAnnotationStyle({x:0,y:0,width:1,height:1})", key="cell-grid-resizer")
...@@ -340,7 +348,10 @@ ...@@ -340,7 +348,10 @@
resize: {x: undefined, y: undefined, pushed: false, pos: undefined} resize: {x: undefined, y: undefined, pushed: false, pos: undefined}
}, },
handlerNewCellTemp: {visibility: true, left: 0}, handlerNewCellTemp: {visibility: true, left: 0},
tempHandler: {move: {left: undefined}} tempHandler: {
move: {left: undefined, visibility: false},
resize: {left: undefined, visibility: false}
}
} }
}, },
computed: { computed: {
...@@ -477,11 +488,16 @@ ...@@ -477,11 +488,16 @@
intersectionChanged (obj) { intersectionChanged (obj) {
// console.log(obj) // console.log(obj)
// console.log(this.tempHandler.move.left) // console.log(this.tempHandler.move.left)
if (obj.element === 'move') { if (obj.element === 'move') {
console.log('MOVE') Math.sign(obj.offsetLeft) === 1 ? this.tempHandler.move.left = window.innerWidth - 40 : this.tempHandler.move.left = 0
this.tempHandler.move.visibility = obj.intersecting
} }
if (obj.element === 'resize') { if (obj.element === 'resize') {
console.log('RESIZE') // Math.sign(obj.offsetLeft) === 1 ? this.tempHandler.resize.left = window.innerWidth - 40 : this.tempHandler.resize.left = 0
Math.sign(obj.offsetLeft) === 1 ? this.tempHandler.resize.left = window.innerWidth - 40 : this.tempHandler.resize.left = 0
Math.sign(obj.offsetLeft) <= 0 ? this.tempHandler.resize.visibility = true : this.tempHandler.resize.visibility = 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