Commit 251be353 authored by christianrhansen's avatar christianrhansen

put function in variable

parent ffd5d595
......@@ -454,39 +454,42 @@
},
methods: {
intersectionChanged (obj) {
//
let _offsetLeft = Math.sign(obj.offsetLeft)
// -------------------- move
if (obj.element === 'move') {
this.tempHandler.move.intersectingMain = obj.intersecting
// behind left side
if (Math.sign(obj.offsetLeft) < 0) {
if (_offsetLeft < 0) {
this.tempHandler.move.side = 'left'
}
// intersecting
else if (isNaN(Math.sign(obj.offsetLeft))) {
else if (isNaN(_offsetLeft)) {
if (this.tempHandler.move.intersectingMain && this.tempHandler.move.side === 'right') this.tempHandler.resize.intersectingMain = false
}
// behind right side
else if (Math.sign(obj.offsetLeft) === 1) {
else if (_offsetLeft === 1) {
this.tempHandler.move.side = 'right'
this.tempHandler.resize.intersectingMain = true
}
}
// -------------------- resize
if (obj.element === 'resize') {
else if (obj.element === 'resize') {
this.tempHandler.resize.intersectingMain = obj.intersecting
// on left side
if (Math.sign(obj.offsetLeft) === -1) {
if (_offsetLeft === -1) {
this.tempHandler.resize.side = 'left'
}
/*
// intersecting
else if (isNaN(Math.sign(obj.offsetLeft))) {
}
*/
// on right side
else if (Math.sign(obj.offsetLeft) === 1) {
else if (_offsetLeft === 1) {
this.tempHandler.resize.side = 'right'
}
}
......
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