Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in / Register
Toggle navigation
Q
Quasar Components MoSys
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
16
Issues
16
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
List
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Motion Bank
MB.js
Quasar Components MoSys
Compare Revisions
d459e9ddc7bb6044abfae80e34711cc51f410dad...3347d83b1b0c8fd5b1d45415d8fc6fba4b5123f5
Source
3347d83b1b0c8fd5b1d45415d8fc6fba4b5123f5
Select Git revision
...
Target
d459e9ddc7bb6044abfae80e34711cc51f410dad
Select Git revision
Compare
Commits (2)
clean-up handleMoveCell()
· 888d8f26
christianrhansen
authored
Nov 07, 2019
888d8f26
clean-up handleResizeCell()
· 3347d83b
christianrhansen
authored
Nov 07, 2019
3347d83b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
48 deletions
+35
-48
partials/GridEditor.vue
partials/GridEditor.vue
+35
-48
No files found.
partials/GridEditor.vue
View file @
3347d83b
...
@@ -249,8 +249,6 @@
...
@@ -249,8 +249,6 @@
mobileTempCell
:
{
mobileTempCell
:
{
x
:
0
,
x
:
0
,
y
:
0
,
y
:
0
,
ox
:
0
,
oy
:
0
,
width
:
1
,
width
:
1
,
height
:
1
,
height
:
1
,
left
:
0
,
left
:
0
,
...
@@ -433,74 +431,63 @@
...
@@ -433,74 +431,63 @@
}
}
},
},
handleMoveCell
(
obj
)
{
handleMoveCell
(
obj
)
{
this
.
cellHandler
.
move
.
x
=
obj
.
position
.
left
let
this
.
cellHandler
.
move
.
y
=
obj
.
position
.
top
pos
=
this
.
getGridPositionForEvent
(
obj
),
fullCell
=
this
.
gridDimensions
.
full
.
cell
,
let
res
=
this
.
getGridPositionForEvent
(
obj
)
moveHandler
=
this
.
cellHandler
.
move
,
tempCell
=
this
.
mobileTempCell
this
.
cellHandler
.
move
.
gridPosition
.
row
=
res
.
y
this
.
cellHandler
.
move
.
gridPosition
.
column
=
res
.
x
if
(
obj
.
isFirst
)
{
if
(
obj
.
isFirst
)
{
this
.
activeHandler
=
true
this
.
activeHandler
=
true
t
his
.
mobileT
empCell
.
show
=
true
tempCell
.
show
=
true
this
.
cellHandler
.
move
.
pushed
=
true
moveHandler
.
pushed
=
true
}
}
t
his
.
mobileTempCell
.
x
=
re
s
.
x
t
empCell
.
x
=
po
s
.
x
t
his
.
mobileTempCell
.
y
=
re
s
.
y
t
empCell
.
y
=
po
s
.
y
this
.
mobileTempCell
.
ox
=
res
.
ox
moveHandler
.
x
=
pos
.
ox
this
.
mobileTempCell
.
oy
=
res
.
oy
moveHandler
.
y
=
pos
.
oy
moveHandler
.
gridPosition
.
row
=
pos
.
y
this
.
cellHandler
.
move
.
x
=
res
.
ox
moveHandler
.
gridPosition
.
column
=
pos
.
x
this
.
cellHandler
.
move
.
y
=
res
.
oy
if
(
obj
.
isFinal
)
{
if
(
obj
.
isFinal
)
{
this
.
activeHandler
=
false
this
.
activeHandler
=
false
this
.
mobileTempCell
.
onGrid
=
true
tempCell
.
onGrid
=
true
this
.
mobileTempCell
.
left
=
this
.
gridDimensions
.
full
.
cell
.
width
*
(
res
.
x
-
1
)
moveHandler
.
pushed
=
false
this
.
cellHandler
.
move
.
pushed
=
false
moveHandler
.
x
=
fullCell
.
width
*
(
tempCell
.
x
-
1
)
+
8
+
20
// this.cellHandler.move.y = this.gridDimensions.full.cell.height * (res.y - 1) + 8 + 59 + 20
moveHandler
.
y
=
fullCell
.
height
*
(
tempCell
.
y
-
1
)
+
8
+
20
this
.
cellHandler
.
move
.
x
=
this
.
gridDimensions
.
full
.
cell
.
width
*
(
this
.
mobileTempCell
.
x
-
1
)
+
8
+
20
this
.
cellHandler
.
resize
.
x
=
fullCell
.
width
*
(
pos
.
x
+
tempCell
.
width
-
1
)
-
8
-
20
this
.
cellHandler
.
move
.
y
=
this
.
gridDimensions
.
full
.
cell
.
height
*
(
this
.
mobileTempCell
.
y
-
1
)
+
8
+
20
this
.
cellHandler
.
resize
.
y
=
fullCell
.
height
*
(
pos
.
y
+
tempCell
.
height
-
1
)
-
8
-
20
this
.
cellHandler
.
resize
.
x
=
this
.
gridDimensions
.
full
.
cell
.
width
*
(
res
.
x
+
this
.
mobileTempCell
.
width
-
1
)
-
8
-
20
this
.
cellHandler
.
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}
let
// this.cellHandler.resize = {x: obj.position.left, y: obj.position.top}
pos
=
this
.
getGridPositionForEvent
(
obj
),
this
.
cellHandler
.
resize
.
x
=
obj
.
position
.
left
resizeHandler
=
this
.
cellHandler
.
resize
,
this
.
cellHandler
.
resize
.
y
=
obj
.
position
.
top
tempCell
=
this
.
mobileTempCell
// ---> panGrid
let
res
=
this
.
getGridPositionForEvent
(
obj
)
this
.
cellHandler
.
resize
.
gridPosition
.
row
=
re
s
.
y
resizeHandler
.
gridPosition
.
row
=
po
s
.
y
this
.
cellHandler
.
resize
.
gridPosition
.
column
=
re
s
.
x
resizeHandler
.
gridPosition
.
column
=
po
s
.
x
if
(
obj
.
isFirst
)
{
if
(
obj
.
isFirst
)
{
this
.
activeHandler
=
true
this
.
activeHandler
=
true
t
his
.
mobileT
empCell
.
show
=
true
tempCell
.
show
=
true
this
.
cellHandler
.
resize
.
pushed
=
true
resizeHandler
.
pushed
=
true
}
}
t
his
.
mobileTempCell
.
width
=
res
.
x
-
this
.
mobileT
empCell
.
x
+
1
t
empCell
.
width
=
pos
.
x
-
t
empCell
.
x
+
1
t
his
.
mobileTempCell
.
height
=
res
.
y
-
this
.
mobileT
empCell
.
y
+
1
t
empCell
.
height
=
pos
.
y
-
t
empCell
.
y
+
1
this
.
cellHandler
.
resize
.
x
=
re
s
.
ox
resizeHandler
.
x
=
po
s
.
ox
this
.
cellHandler
.
resize
.
y
=
re
s
.
oy
resizeHandler
.
y
=
po
s
.
oy
if
(
obj
.
isFinal
)
{
if
(
obj
.
isFinal
)
{
this
.
activeHandler
=
false
this
.
activeHandler
=
false
this
.
mobileTempCell
.
onGrid
=
true
tempCell
.
onGrid
=
true
this
.
cellHandler
.
resize
.
pushed
=
false
resizeHandler
.
pushed
=
false
// this.addMobileCell(obj)
resizeHandler
.
x
=
this
.
gridDimensions
.
full
.
cell
.
width
*
pos
.
x
-
8
-
20
// this.mobileTempCell.show = false
resizeHandler
.
y
=
this
.
gridDimensions
.
full
.
cell
.
height
*
pos
.
y
-
8
-
20
this
.
cellHandler
.
resize
.
x
=
this
.
gridDimensions
.
full
.
cell
.
width
*
res
.
x
-
8
-
20
this
.
cellHandler
.
resize
.
y
=
this
.
gridDimensions
.
full
.
cell
.
height
*
res
.
y
-
8
-
20
}
}
},
},
handleCellEdit
(
event
,
annotation
)
{
handleCellEdit
(
event
,
annotation
)
{
...
...