Commit 6bc9b73c authored by christianrhansen's avatar christianrhansen

renamed prop for cellHandler

parent aaf4c0b4
Pipeline #51226 passed with stage
in 5 minutes and 30 seconds
......@@ -6,14 +6,14 @@
<script>
export default {
props: ['element', 'doubleTap'],
props: ['type', 'doubleTap'],
data () {
return {
clickTimer: null
}
},
mounted () {
if (this.element) {
if (this.type) {
let observer = new IntersectionObserver(this.observerCallback)
observer.observe(this.$refs.targetHandler)
this.observer = observer
......@@ -40,7 +40,7 @@
observerCallback (entries) {
let
target = entries[0],
arg = {element: this.element, intersecting: target.isIntersecting, offsetLeft: undefined}
arg = {type: this.type, intersecting: target.isIntersecting, offsetLeft: undefined}
if (!target.isIntersecting) Object.assign(arg, {offsetLeft: target.boundingClientRect.left})
......
......@@ -117,7 +117,7 @@
cell-handler.default-handler(
v-if="!cellHandler.resize.pushed",
@onIntersectionChange="intersectionChanged",
:element="'move'",
:type="'move'",
v-touch-pan="moveCell",
:style="{left: cellHandler.move.x - 20 + 4 + 'px', top: cellHandler.move.y - 20 + 4 + 'px'}",
:class="[{'pushed': !cellHandler.move.pushed}, {'hide': cellHandler.hidden}]")
......@@ -138,7 +138,7 @@
cell-handler.default-handler(
v-if="!cellHandler.move.pushed",
@onIntersectionChange="intersectionChanged",
:element="'resize'",
:type="'resize'",
v-touch-pan="resizeCell",
:style="{left: cellHandler.resize.x - 20 - 4 + 'px', top: cellHandler.resize.y - 20 - 4 + 'px'}",
:class="[{'pushed': !cellHandler.resize.pushed}, {'hide': cellHandler.hidden}]")
......@@ -504,7 +504,7 @@
resizeHandler = this.sideHandler.resize
// -------------------- move
if (obj.element === 'move') {
if (obj.type === 'move') {
moveHandler.intersectingMainHandler = obj.intersecting
// behind left side
......@@ -523,7 +523,7 @@
}
// -------------------- resize
else if (obj.element === 'resize') {
else if (obj.type === 'resize') {
resizeHandler.intersectingMainHandler = obj.intersecting
// on left side
......
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