Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
EXSYS2021
da6
Hold Afstand
Commits
c3fc51e7
Commit
c3fc51e7
authored
May 06, 2021
by
Kent Nielsen
Browse files
Resizing now fixed when deleting is available
parent
ca3d6864
Pipeline
#52314
passed with stage
in 41 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
website/studerende-dk/src/views/Home.vue
View file @
c3fc51e7
...
...
@@ -206,13 +206,24 @@ export default {
},
resizeVertical
(
event
,
index
){
if
(
index
==
0
||
this
.
deleting
){
return
;
}
const
clickTarget
=
event
.
target
;
if
(
clickTarget
.
className
!=
"
row
"
){
return
;
}
if
(
event
.
offsetY
>
this
.
layout
[
index
].
height
){
this
.
mouseDragPos
.
y
=
event
.
y
;
this
.
verticalResizeObject
.
index
=
index
;
document
.
addEventListener
(
"
mousemove
"
,
this
.
resizeVerticalMouseMove
,
false
);
document
.
addEventListener
(
"
mouseup
"
,
this
.
eventRemover
,
false
);
document
.
getElementsByTagName
(
"
html
"
)[
0
].
classList
.
add
(
"
no-select
"
);
console
.
log
(
"
:After event
"
)
}
else
{
index
--
;
}
this
.
mouseDragPos
.
y
=
event
.
y
;
this
.
verticalResizeObject
.
index
=
index
;
document
.
addEventListener
(
"
mousemove
"
,
this
.
resizeVerticalMouseMove
,
false
);
document
.
addEventListener
(
"
mouseup
"
,
this
.
eventRemover
,
false
);
document
.
getElementsByTagName
(
"
html
"
)[
0
].
classList
.
add
(
"
no-select
"
);
},
eventRemover
(){
...
...
@@ -266,6 +277,7 @@ export default {
.row
{
display
:
flex
;
padding-top
:
$gap
;
position
:
relative
;
&
:hover
{
.remove-block
{
...
...
@@ -295,16 +307,31 @@ export default {
}
// Must be outside ".row" or else after affect children
.
row
:
:
after
{
content
:
" "
;
background-color
:
rgba
(
0
,
0
,
0
,
0
);
position
:
absolute
;
bottom
:
-
$gap
;
width
:
100%
;
height
:
$gap
;
cursor
:
n-resize
;
.row
:not
(
:first-of-type
)
{
&
::before
{
content
:
" "
;
background-color
:
rgba
(
0
,
0
,
0
,
0
);
position
:
absolute
;
top
:
0
;
width
:
100%
;
height
:
$gap
;
cursor
:
n-resize
;
}
}
.row
:last-of-type
{
&
::after
{
content
:
" "
;
background-color
:
rgba
(
0
,
0
,
0
,
0
);
position
:
absolute
;
bottom
:
-
$gap
;
width
:
100%
;
height
:
$gap
;
cursor
:
n-resize
;
}
}
.col
{
flex-basis
:
0
;
// a basis of 0px. very important!
background-color
:
$light-green-theme-color
;
...
...
Write
Preview
Supports
Markdown
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