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
0be1f642
Commit
0be1f642
authored
May 19, 2020
by
anton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Verify input for getCellStyle function
parent
b307d343
Pipeline
#59601
passed with stage
in 6 minutes and 31 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
partials/GridEditor.vue
partials/GridEditor.vue
+14
-10
No files found.
partials/GridEditor.vue
View file @
0be1f642
...
...
@@ -1247,22 +1247,26 @@
}
},
getCellStyle
(
obj
)
{
let
x
,
y
,
w
,
h
if
(
!
obj
)
return
{}
let
x
=
0
,
y
=
0
,
w
=
0
,
h
=
0
// ----- existing cell
if
(
obj
.
id
)
{
if
(
obj
.
id
&&
obj
.
target
&&
obj
.
target
.
selector
)
{
const
parsed
=
obj
.
target
.
selector
.
_value
x
=
parsed
.
xywh
[
0
]
y
=
parsed
.
xywh
[
1
]
w
=
parsed
.
xywh
[
2
]
h
=
parsed
.
xywh
[
3
]
if
(
Array
.
isArray
(
parsed
.
xywh
)
&&
parsed
.
xywh
.
length
===
4
)
{
x
=
parsed
.
xywh
[
0
]
y
=
parsed
.
xywh
[
1
]
w
=
parsed
.
xywh
[
2
]
h
=
parsed
.
xywh
[
3
]
}
}
// ----- temp cell
else
{
x
=
obj
.
x
y
=
obj
.
y
w
=
obj
.
width
h
=
obj
.
height
x
=
obj
.
x
||
x
y
=
obj
.
y
||
y
w
=
obj
.
width
||
w
h
=
obj
.
height
||
h
}
return
{
'
grid-column-start
'
:
x
,
...
...
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