Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Motion Bank
MB.js
Quasar Components MoSys
Commits
7f395cee
Commit
7f395cee
authored
Oct 29, 2019
by
christianrhansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mobile: improved temp cell handler query
parent
319a9c9c
Pipeline
#18236
passed with stage
in 37 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
10 deletions
+49
-10
partials/GridEditor.vue
partials/GridEditor.vue
+49
-10
No files found.
partials/GridEditor.vue
View file @
7f395cee
...
...
@@ -183,7 +183,7 @@
//----- (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
']",
:class="[tempHandler.resize.visibility ? 'temp-
show
': 'temp-
hide
']",
: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;")
...
...
@@ -349,8 +349,8 @@
},
handlerNewCellTemp
:
{
visibility
:
true
,
left
:
0
},
tempHandler
:
{
move
:
{
left
:
undefined
,
visibility
:
false
},
resize
:
{
left
:
undefined
,
visibility
:
false
}
move
:
{
left
:
undefined
,
visibility
:
false
,
intersectingMainHandler
:
undefined
},
resize
:
{
left
:
undefined
,
visibility
:
false
,
intersectingMainHandler
:
undefined
}
}
}
},
...
...
@@ -486,18 +486,57 @@
},
methods
:
{
intersectionChanged
(
obj
)
{
// console.log(obj)
// console.log(this.tempHandler.move.left)
//
// -------------------- move
if
(
obj
.
element
===
'
move
'
)
{
Math
.
sign
(
obj
.
offsetLeft
)
===
1
?
this
.
tempHandler
.
move
.
left
=
window
.
innerWidth
-
40
:
this
.
tempHandler
.
move
.
left
=
0
this
.
tempHandler
.
move
.
intersectingMainHandler
=
obj
.
intersecting
this
.
tempHandler
.
move
.
visibility
=
obj
.
intersecting
if
(
Math
.
sign
(
obj
.
offsetLeft
)
<
0
)
{
this
.
tempHandler
.
move
.
left
=
0
}
else
if
(
Math
.
sign
(
obj
.
offsetLeft
)
===
0
)
{
}
else
if
(
Math
.
sign
(
obj
.
offsetLeft
)
===
1
)
{
this
.
tempHandler
.
move
.
left
=
window
.
innerWidth
-
40
}
// ----- 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
if
(
obj
.
element
===
'
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
this
.
tempHandler
.
resize
.
intersectingMainHandler
=
obj
.
intersecting
if
(
Math
.
sign
(
obj
.
offsetLeft
)
===
1
)
{
this
.
tempHandler
.
resize
.
left
=
window
.
innerWidth
-
40
}
else
if
(
Math
.
sign
(
obj
.
offsetLeft
)
===
-
1
)
{
this
.
tempHandler
.
resize
.
left
=
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
)
{
this
.
tempHandler
.
resize
.
visibility
=
false
}
// this.tempHandler.resize.visibility = obj.intersecting
}
},
/*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment