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
9ca9ccba
Commit
9ca9ccba
authored
Nov 05, 2019
by
christianrhansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renaming variable (handlerNewCell -> cellHandler)
parent
38d50bc5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
35 deletions
+35
-35
partials/GridEditor.vue
partials/GridEditor.vue
+35
-35
No files found.
partials/GridEditor.vue
View file @
9ca9ccba
...
@@ -154,12 +154,12 @@
...
@@ -154,12 +154,12 @@
//----------------------------------------------------------------------------------------------- move handler
//----------------------------------------------------------------------------------------------- move handler
//----- (main)
//----- (main)
cell-handler-mobile.main-handler.shadow-1(
cell-handler-mobile.main-handler.shadow-1(
v-if="!
h
andler
NewCell
.resize.pushed",
v-if="!
cellH
andler.resize.pushed",
@onIntersectionChange="intersectionChanged",
@onIntersectionChange="intersectionChanged",
:element="'move'",
:element="'move'",
v-touch-pan="handleMoveCell",
v-touch-pan="handleMoveCell",
:style="{left:
h
andler
NewCell
.move.x - 20 + 'px', top:
h
andler
NewCell
.move.y - 20 + 'px'}",
:style="{left:
cellH
andler.move.x - 20 + 'px', top:
cellH
andler.move.y - 20 + 'px'}",
:class="[{'pushed': !
h
andler
NewCell
.move.pushed}, {'hide': !mobileTempCell.onGrid}]")
:class="[{'pushed': !
cellH
andler.move.pushed}, {'hide': !mobileTempCell.onGrid}]")
q-icon.rotate-180(name="open_with", size="22px")
q-icon.rotate-180(name="open_with", size="22px")
//----- (temp)
//----- (temp)
...
@@ -167,27 +167,27 @@
...
@@ -167,27 +167,27 @@
cell-handler-mobile.temp-handler.shadow-1(
cell-handler-mobile.temp-handler.shadow-1(
v-touch-pan="handleMoveCell",
v-touch-pan="handleMoveCell",
:doubleTap="{el: $el, type: 'scroll', oLeft: mobileTempCell.left}",
:doubleTap="{el: $el, type: 'scroll', oLeft: mobileTempCell.left}",
:class="[(!mobileTempCell.onGrid || tempHandler.move.intersectingMainHandler ||
h
andler
NewCell
.resize.pushed ||
h
andler
NewCell
.move.pushed ? 'hide': 'show'), (tempHandler.move.side === 'left' ? 'left-side' : 'right-side')]",
:class="[(!mobileTempCell.onGrid || tempHandler.move.intersectingMainHandler ||
cellH
andler.resize.pushed ||
cellH
andler.move.pushed ? 'hide': 'show'), (tempHandler.move.side === 'left' ? 'left-side' : 'right-side')]",
:style="{top:
h
andler
NewCell
.move.y + 59 - 20 + 'px'}",)
:style="{top:
cellH
andler.move.y + 59 - 20 + 'px'}",)
q-icon.rotate-180(name="open_with", size="22px")
q-icon.rotate-180(name="open_with", size="22px")
//--------------------------------------------------------------------------------------------- resize handler
//--------------------------------------------------------------------------------------------- resize handler
//----- (main)
//----- (main)
cell-handler-mobile.main-handler.shadow-1(
cell-handler-mobile.main-handler.shadow-1(
v-if="!
h
andler
NewCell
.move.pushed",
v-if="!
cellH
andler.move.pushed",
@onIntersectionChange="intersectionChanged",
@onIntersectionChange="intersectionChanged",
:element="'resize'",
:element="'resize'",
v-touch-pan="handleResizeCell",
v-touch-pan="handleResizeCell",
:style="{left:
h
andler
NewCell
.resize.x - 20 + 'px', top:
h
andler
NewCell
.resize.y - 20 + 'px'}",
:style="{left:
cellH
andler.resize.x - 20 + 'px', top:
cellH
andler.resize.y - 20 + 'px'}",
:class="[{'pushed': !
h
andler
NewCell
.resize.pushed}, {'hide': !mobileTempCell.onGrid}]")
:class="[{'pushed': !
cellH
andler.resize.pushed}, {'hide': !mobileTempCell.onGrid}]")
q-icon(name="signal_cellular_4_bar", size="12px", style="margin-left: -3px;")
q-icon(name="signal_cellular_4_bar", size="12px", style="margin-left: -3px;")
//----- (temp)
//----- (temp)
//----- (when main resize handler is outside of viewport)
//----- (when main resize handler is outside of viewport)
cell-handler-mobile.temp-handler.shadow-1(
cell-handler-mobile.temp-handler.shadow-1(
v-touch-pan="handleResizeCell",
v-touch-pan="handleResizeCell",
:class="[(!mobileTempCell.onGrid || tempHandler.resize.intersectingMainHandler ||
h
andler
NewCell
.move.pushed ||
h
andler
NewCell
.resize.pushed ? 'hide': 'show'), (tempHandler.resize.side === 'left' ? 'left-side' : 'right-side')]",
:class="[(!mobileTempCell.onGrid || tempHandler.resize.intersectingMainHandler ||
cellH
andler.move.pushed ||
cellH
andler.resize.pushed ? 'hide': 'show'), (tempHandler.resize.side === 'left' ? 'left-side' : 'right-side')]",
:style="{top:
h
andler
NewCell
.resize.y + 59 - 20 + 'px'}",)
:style="{top:
cellH
andler.resize.y + 59 - 20 + 'px'}",)
q-icon(name="signal_cellular_4_bar", size="12px", style="margin-left: -3px;")
q-icon(name="signal_cellular_4_bar", size="12px", style="margin-left: -3px;")
// ---------------------------------------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------------------------------
...
@@ -345,7 +345,7 @@
...
@@ -345,7 +345,7 @@
modal
:
false
,
modal
:
false
,
carousel
:
{
visibility
:
false
,
icon
:
'
open_with
'
,
slide
:
0
},
carousel
:
{
visibility
:
false
,
icon
:
'
open_with
'
,
slide
:
0
},
// cursor: {x: undefined, y: undefined},
// cursor: {x: undefined, y: undefined},
h
andler
NewCell
:
{
cellH
andler
:
{
size
:
{
width
:
40
,
height
:
40
},
size
:
{
width
:
40
,
height
:
40
},
move
:
{
x
:
20
,
y
:
undefined
,
pushed
:
false
,
pos
:
undefined
,
inViewport
:
undefined
,
onLeft
:
undefined
,
onRight
:
undefined
,
dataLeft
:
undefined
},
move
:
{
x
:
20
,
y
:
undefined
,
pushed
:
false
,
pos
:
undefined
,
inViewport
:
undefined
,
onLeft
:
undefined
,
onRight
:
undefined
,
dataLeft
:
undefined
},
resize
:
{
x
:
undefined
,
y
:
undefined
,
pushed
:
false
,
pos
:
undefined
}
resize
:
{
x
:
undefined
,
y
:
undefined
,
pushed
:
false
,
pos
:
undefined
}
...
@@ -503,15 +503,15 @@
...
@@ -503,15 +503,15 @@
}
}
},
},
handleMoveCell
(
obj
)
{
handleMoveCell
(
obj
)
{
this
.
h
andler
NewCell
.
move
.
x
=
obj
.
position
.
left
this
.
cellH
andler
.
move
.
x
=
obj
.
position
.
left
this
.
h
andler
NewCell
.
move
.
y
=
obj
.
position
.
top
this
.
cellH
andler
.
move
.
y
=
obj
.
position
.
top
let
res
=
this
.
getGridPositionForEvent
(
obj
)
let
res
=
this
.
getGridPositionForEvent
(
obj
)
if
(
obj
.
isFirst
)
{
if
(
obj
.
isFirst
)
{
this
.
mobileTempCell
.
show
=
true
this
.
mobileTempCell
.
show
=
true
this
.
mobileTempCell
.
button
=
false
this
.
mobileTempCell
.
button
=
false
this
.
h
andler
NewCell
.
move
.
pushed
=
true
this
.
cellH
andler
.
move
.
pushed
=
true
}
}
this
.
mobileTempCell
.
x
=
res
.
x
this
.
mobileTempCell
.
x
=
res
.
x
...
@@ -520,27 +520,27 @@
...
@@ -520,27 +520,27 @@
this
.
mobileTempCell
.
ox
=
res
.
ox
this
.
mobileTempCell
.
ox
=
res
.
ox
this
.
mobileTempCell
.
oy
=
res
.
oy
this
.
mobileTempCell
.
oy
=
res
.
oy
this
.
h
andler
NewCell
.
move
.
x
=
res
.
ox
this
.
cellH
andler
.
move
.
x
=
res
.
ox
this
.
h
andler
NewCell
.
move
.
y
=
res
.
oy
this
.
cellH
andler
.
move
.
y
=
res
.
oy
if
(
obj
.
isFinal
)
{
if
(
obj
.
isFinal
)
{
this
.
mobileTempCell
.
onGrid
=
true
this
.
mobileTempCell
.
onGrid
=
true
this
.
mobileTempCell
.
button
=
true
this
.
mobileTempCell
.
button
=
true
this
.
mobileTempCell
.
left
=
this
.
gridDimensions
.
full
.
cell
.
width
*
(
res
.
x
-
1
)
this
.
mobileTempCell
.
left
=
this
.
gridDimensions
.
full
.
cell
.
width
*
(
res
.
x
-
1
)
this
.
h
andler
NewCell
.
move
.
pushed
=
false
this
.
cellH
andler
.
move
.
pushed
=
false
// this.
h
andler
NewCell
.move.y = this.gridDimensions.full.cell.height * (res.y - 1) + 8 + 59 + 20
// this.
cellH
andler.move.y = this.gridDimensions.full.cell.height * (res.y - 1) + 8 + 59 + 20
this
.
h
andler
NewCell
.
move
.
x
=
this
.
gridDimensions
.
full
.
cell
.
width
*
(
this
.
mobileTempCell
.
x
-
1
)
+
8
+
20
this
.
cellH
andler
.
move
.
x
=
this
.
gridDimensions
.
full
.
cell
.
width
*
(
this
.
mobileTempCell
.
x
-
1
)
+
8
+
20
this
.
h
andler
NewCell
.
move
.
y
=
this
.
gridDimensions
.
full
.
cell
.
height
*
(
this
.
mobileTempCell
.
y
-
1
)
+
8
+
20
this
.
cellH
andler
.
move
.
y
=
this
.
gridDimensions
.
full
.
cell
.
height
*
(
this
.
mobileTempCell
.
y
-
1
)
+
8
+
20
this
.
h
andler
NewCell
.
resize
.
x
=
this
.
gridDimensions
.
full
.
cell
.
width
*
(
res
.
x
+
this
.
mobileTempCell
.
width
-
1
)
-
8
-
20
this
.
cellH
andler
.
resize
.
x
=
this
.
gridDimensions
.
full
.
cell
.
width
*
(
res
.
x
+
this
.
mobileTempCell
.
width
-
1
)
-
8
-
20
this
.
h
andler
NewCell
.
resize
.
y
=
this
.
gridDimensions
.
full
.
cell
.
height
*
(
res
.
y
+
this
.
mobileTempCell
.
height
-
1
)
-
8
-
20
this
.
cellH
andler
.
resize
.
y
=
this
.
gridDimensions
.
full
.
cell
.
height
*
(
res
.
y
+
this
.
mobileTempCell
.
height
-
1
)
-
8
-
20
}
}
},
},
handleResizeCell
(
obj
)
{
handleResizeCell
(
obj
)
{
// this.cursor = {x: obj.position.left, y: obj.position.top}
// this.cursor = {x: obj.position.left, y: obj.position.top}
// this.
h
andler
NewCell
.resize = {x: obj.position.left, y: obj.position.top}
// this.
cellH
andler.resize = {x: obj.position.left, y: obj.position.top}
this
.
h
andler
NewCell
.
resize
.
x
=
obj
.
position
.
left
this
.
cellH
andler
.
resize
.
x
=
obj
.
position
.
left
this
.
h
andler
NewCell
.
resize
.
y
=
obj
.
position
.
top
this
.
cellH
andler
.
resize
.
y
=
obj
.
position
.
top
// ---> panGrid
// ---> panGrid
let
res
=
this
.
getGridPositionForEvent
(
obj
)
let
res
=
this
.
getGridPositionForEvent
(
obj
)
...
@@ -548,23 +548,23 @@
...
@@ -548,23 +548,23 @@
if
(
obj
.
isFirst
)
{
if
(
obj
.
isFirst
)
{
this
.
mobileTempCell
.
show
=
true
this
.
mobileTempCell
.
show
=
true
this
.
mobileTempCell
.
button
=
false
this
.
mobileTempCell
.
button
=
false
this
.
h
andler
NewCell
.
resize
.
pushed
=
true
this
.
cellH
andler
.
resize
.
pushed
=
true
}
}
this
.
mobileTempCell
.
width
=
res
.
x
-
this
.
mobileTempCell
.
x
+
1
this
.
mobileTempCell
.
width
=
res
.
x
-
this
.
mobileTempCell
.
x
+
1
this
.
mobileTempCell
.
height
=
res
.
y
-
this
.
mobileTempCell
.
y
+
1
this
.
mobileTempCell
.
height
=
res
.
y
-
this
.
mobileTempCell
.
y
+
1
this
.
h
andler
NewCell
.
resize
.
x
=
res
.
ox
this
.
cellH
andler
.
resize
.
x
=
res
.
ox
this
.
h
andler
NewCell
.
resize
.
y
=
res
.
oy
this
.
cellH
andler
.
resize
.
y
=
res
.
oy
if
(
obj
.
isFinal
)
{
if
(
obj
.
isFinal
)
{
this
.
mobileTempCell
.
onGrid
=
true
this
.
mobileTempCell
.
onGrid
=
true
this
.
mobileTempCell
.
button
=
true
this
.
mobileTempCell
.
button
=
true
this
.
h
andler
NewCell
.
resize
.
pushed
=
false
this
.
cellH
andler
.
resize
.
pushed
=
false
// this.addMobileCell(obj)
// this.addMobileCell(obj)
// this.mobileTempCell.show = false
// this.mobileTempCell.show = false
this
.
h
andler
NewCell
.
resize
.
x
=
this
.
gridDimensions
.
full
.
cell
.
width
*
res
.
x
-
8
-
20
this
.
cellH
andler
.
resize
.
x
=
this
.
gridDimensions
.
full
.
cell
.
width
*
res
.
x
-
8
-
20
this
.
h
andler
NewCell
.
resize
.
y
=
this
.
gridDimensions
.
full
.
cell
.
height
*
res
.
y
-
8
-
20
this
.
cellH
andler
.
resize
.
y
=
this
.
gridDimensions
.
full
.
cell
.
height
*
res
.
y
-
8
-
20
}
}
},
},
clearCachedCell
()
{
clearCachedCell
()
{
...
@@ -611,11 +611,11 @@
...
@@ -611,11 +611,11 @@
this
.
mobileTempCell
.
button
=
true
this
.
mobileTempCell
.
button
=
true
// this.addMobileCell(obj)
// this.addMobileCell(obj)
// this.mobileTempCell.show = false
// this.mobileTempCell.show = false
this
.
h
andler
NewCell
.
move
.
x
=
this
.
gridDimensions
.
full
.
cell
.
width
*
(
this
.
mobileTempCell
.
x
-
1
)
+
8
+
20
this
.
cellH
andler
.
move
.
x
=
this
.
gridDimensions
.
full
.
cell
.
width
*
(
this
.
mobileTempCell
.
x
-
1
)
+
8
+
20
this
.
h
andler
NewCell
.
move
.
y
=
this
.
gridDimensions
.
full
.
cell
.
height
*
(
this
.
mobileTempCell
.
y
-
1
)
+
8
+
20
this
.
cellH
andler
.
move
.
y
=
this
.
gridDimensions
.
full
.
cell
.
height
*
(
this
.
mobileTempCell
.
y
-
1
)
+
8
+
20
this
.
h
andler
NewCell
.
resize
.
x
=
this
.
gridDimensions
.
full
.
cell
.
width
*
res
.
x
-
8
-
20
this
.
cellH
andler
.
resize
.
x
=
this
.
gridDimensions
.
full
.
cell
.
width
*
res
.
x
-
8
-
20
this
.
h
andler
NewCell
.
resize
.
y
=
this
.
gridDimensions
.
full
.
cell
.
height
*
res
.
y
-
8
-
20
this
.
cellH
andler
.
resize
.
y
=
this
.
gridDimensions
.
full
.
cell
.
height
*
res
.
y
-
8
-
20
}
}
}
}
},
},
...
...
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