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
75d7d551
Commit
75d7d551
authored
Oct 09, 2019
by
christianrhansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mobile: adding new cell after defining cell size via touch works
parent
69f4103a
Pipeline
#16635
passed with stage
in 1 minute and 25 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
partials/GridEditor.vue
partials/GridEditor.vue
+11
-4
No files found.
partials/GridEditor.vue
View file @
75d7d551
...
@@ -19,9 +19,9 @@
...
@@ -19,9 +19,9 @@
q-icon(name="clear")
q-icon(name="clear")
// ------------------------------------------------------------------------------------------------------------ grid
// ------------------------------------------------------------------------------------------------------------ grid
@click="event => {addMobileCell(event)}",
div.cell-grid(
div.cell-grid(
v-touch-pan="panGrid",
v-touch-pan="panGrid",
@click="event => {addMobileCell(event)}",
@dragenter="handleGridDragOver",
@dragenter="handleGridDragOver",
@dragover="handleGridDragOver",
@dragover="handleGridDragOver",
@dragleave="handleGridDragEnd",
@dragleave="handleGridDragEnd",
...
@@ -339,6 +339,9 @@
...
@@ -339,6 +339,9 @@
}
}
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
if
(
obj
.
isFinal
)
{
this
.
addMobileCell
(
obj
)
}
},
},
async
cellHold
(
event
,
annotation
)
{
async
cellHold
(
event
,
annotation
)
{
this
.
$store
.
commit
(
'
mosys/setEditingCells
'
,
''
)
this
.
$store
.
commit
(
'
mosys/setEditingCells
'
,
''
)
...
@@ -371,8 +374,8 @@
...
@@ -371,8 +374,8 @@
*/
*/
// console.log('--->>>', this.getGridPositionForEvent(event))
// console.log('--->>>', this.getGridPositionForEvent(event))
},
},
addMobileCell
(
event
,
annotation
)
{
addMobileCell
(
event
)
{
console
.
log
(
'
addMobileCell()
'
,
event
,
annotation
)
//
console.log('addMobileCell()', event, annotation)
if
(
this
.
cachedNewCell
)
{
if
(
this
.
cachedNewCell
)
{
this
.
handleGridDrop
(
event
)
this
.
handleGridDrop
(
event
)
this
.
$store
.
commit
(
'
mosys/cacheNewCell
'
,
undefined
)
this
.
$store
.
commit
(
'
mosys/cacheNewCell
'
,
undefined
)
...
@@ -564,6 +567,8 @@
...
@@ -564,6 +567,8 @@
}])
}])
}
}
else
{
else
{
if
(
this
.
mobileTempCell
.
x
)
console
.
log
(
'
this.mobileTempCell
'
,
this
.
mobileTempCell
)
let
test
=
this
.
grid
.
get2DArea
([
this
.
mobileTempCell
.
x
,
this
.
mobileTempCell
.
y
],
[
this
.
mobileTempCell
.
width
,
this
.
mobileTempCell
.
height
])
const
const
{
data
,
config
,
component
}
=
dropData
,
{
data
,
config
,
component
}
=
dropData
,
cell
=
await
this
.
$store
.
dispatch
(
'
cells/post
'
,
{
data
,
config
,
component
})
cell
=
await
this
.
$store
.
dispatch
(
'
cells/post
'
,
{
data
,
config
,
component
})
...
@@ -575,7 +580,8 @@
...
@@ -575,7 +580,8 @@
id
:
cell
.
id
id
:
cell
.
id
}
}
},
},
target
:
this
.
grid
.
get2DArea
([
x
,
y
],
[
1
,
1
])
// target: this.grid.get2DArea([x, y], [1, 1])
target
:
test
})
})
this
.
annotations
.
push
(
annotation
)
this
.
annotations
.
push
(
annotation
)
this
.
updateAnnotationUIStates
()
this
.
updateAnnotationUIStates
()
...
@@ -584,6 +590,7 @@
...
@@ -584,6 +590,7 @@
this
.
tmpObjects
=
[]
this
.
tmpObjects
=
[]
event
.
preventDefault
()
event
.
preventDefault
()
}
}
this
.
mobileTempCell
=
{
x
:
undefined
,
y
:
undefined
,
width
:
undefined
,
height
:
undefined
}
},
},
//
//
...
...
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