Commit 7b0ab1b8 authored by christianrhansen's avatar christianrhansen
Browse files

code clean-up

parent 7f395cee
Pipeline #18247 passed with stage
in 20 seconds
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
//----- (when main resize handler is outside of viewport) //----- (when main resize 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="handleResizeCell", v-touch-pan="handleResizeCell",
:class="[tempHandler.resize.visibility ? 'temp-show': 'temp-hide']", :class="[tempHandler.resize.visibility ? 'temp-hide': 'temp-show']",
:style="{left: tempHandler.resize.left + 'px', top: handlerNewCell.resize.y + 59 - 20 + 'px'}",) :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;") q-icon.self-center(name="signal_cellular_4_bar", size="12px", style="margin-left: -3px;")
...@@ -492,51 +492,37 @@ ...@@ -492,51 +492,37 @@
this.tempHandler.move.intersectingMainHandler = obj.intersecting this.tempHandler.move.intersectingMainHandler = obj.intersecting
this.tempHandler.move.visibility = obj.intersecting this.tempHandler.move.visibility = obj.intersecting
// behind left side
if (Math.sign(obj.offsetLeft) < 0) { if (Math.sign(obj.offsetLeft) < 0) {
this.tempHandler.move.left = 0 this.tempHandler.move.left = 4
} }
// visible
else if (Math.sign(obj.offsetLeft) === 0) { else if (Math.sign(obj.offsetLeft) === 0) {
this.tempHandler.resize.visibility = true
} }
// behind right side
else if (Math.sign(obj.offsetLeft) === 1) { else if (Math.sign(obj.offsetLeft) === 1) {
this.tempHandler.move.left = window.innerWidth - 40 this.tempHandler.move.left = window.innerWidth - 40 - 4
}
// ----- visibility resize
/*
if (this.tempHandler.move.left > 0) {
this.tempHandler.resize.visibility = false
}
else if (this.tempHandler.move.left === 0) {
this.tempHandler.resize.visibility = false
}
if (Math.sign(this.tempHandler.resize.left) > 0) {
this.tempHandler.resize.visibility = true
} }
*/
} }
// -------------------- resize // -------------------- resize
if (obj.element === 'resize') { if (obj.element === 'resize') {
this.tempHandler.resize.intersectingMainHandler = obj.intersecting this.tempHandler.resize.intersectingMainHandler = obj.intersecting
this.tempHandler.resize.visibility = obj.intersecting
if (Math.sign(obj.offsetLeft) === 1) { // on left side
this.tempHandler.resize.left = window.innerWidth - 40 if (Math.sign(obj.offsetLeft) === -1) {
this.tempHandler.resize.left = 4
} }
else if (Math.sign(obj.offsetLeft) === -1) { // visible
this.tempHandler.resize.left = 0 else if (Math.sign(obj.offsetLeft) === 0) {
}
if (Math.sign(obj.offsetLeft) === 1) {
this.tempHandler.resize.visibility = true
}
else if (Math.sign(obj.offsetLeft) === -1) {
this.tempHandler.resize.visibility = true
} }
else if (obj.offsetLeft === undefined) { // on right side
this.tempHandler.resize.visibility = false else if (Math.sign(obj.offsetLeft) === 1) {
this.tempHandler.resize.left = window.innerWidth - 40 - 4
// if (this.tempHandler.move.visibility === false) this.tempHandler.resize.visibility = true
} }
// this.tempHandler.resize.visibility = obj.intersecting
} }
}, },
/* /*
......
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