Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ab73b061
Commit
ab73b061
authored
Mar 01, 2018
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add scroll bottom shadow
parent
68a13836
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
ee/app/assets/javascripts/roadmap/components/epics_list_section.vue
...ets/javascripts/roadmap/components/epics_list_section.vue
+17
-2
No files found.
ee/app/assets/javascripts/roadmap/components/epics_list_section.vue
View file @
ab73b061
...
...
@@ -32,6 +32,8 @@
shellHeight
:
0
,
emptyRowHeight
:
0
,
showEmptyRow
:
false
,
offsetLeft
:
0
,
showBottomShadow
:
false
,
};
},
computed
:
{
...
...
@@ -53,11 +55,16 @@
emptyRowCellStyles
()
{
return
`height:
${
this
.
emptyRowHeight
}
px;`
;
},
shadowCellStyles
()
{
return
`left:
${
this
.
offsetLeft
}
px;`
;
},
},
watch
:
{
shellWidth
:
function
shellWidth
()
{
// Scroll view to today indicator only when shellWidth is updated.
this
.
scrollToTodayIndicator
();
// Initialize offsetLeft when shellWidth is updated
this
.
offsetLeft
=
this
.
$el
.
parentElement
.
offsetLeft
;
},
},
mounted
()
{
...
...
@@ -107,6 +114,8 @@
// set height and show empty row reducing horizontal scrollbar size
this
.
emptyRowHeight
=
(
this
.
shellHeight
-
approxChildrenHeight
)
-
1
;
this
.
showEmptyRow
=
true
;
}
else
{
this
.
showBottomShadow
=
true
;
}
},
/**
...
...
@@ -116,7 +125,7 @@
* update raw element properties upon event via jQuery.
*/
handleScroll
()
{
const
scrollLeft
=
this
.
$el
.
scrollLeft
;
const
{
scrollTop
,
scrollLeft
,
scrollHeight
,
clientHeight
}
=
this
.
$el
;
const
tableEl
=
this
.
$el
.
parentElement
;
if
(
tableEl
)
{
const
$theadEl
=
$
(
tableEl
).
find
(
'
thead
'
);
...
...
@@ -126,7 +135,8 @@
$theadEl
.
find
(
'
th:nth-child(1)
'
).
css
(
'
left
'
,
scrollLeft
);
$tbodyEl
.
find
(
'
td:nth-child(1)
'
).
css
(
'
left
'
,
scrollLeft
);
}
eventHub
.
$emit
(
'
epicsListScrolled
'
,
this
.
$el
.
scrollTop
,
this
.
$el
.
scrollLeft
);
this
.
showBottomShadow
=
(
Math
.
ceil
(
scrollTop
)
+
clientHeight
)
<
scrollHeight
;
eventHub
.
$emit
(
'
epicsListScrolled
'
,
scrollTop
,
scrollLeft
);
},
/**
* `clientWidth` is full width of list section, and we need to
...
...
@@ -148,6 +158,11 @@
:style=
"tbodyStyles"
@
scroll=
"handleScroll"
>
<tr
v-if=
"showBottomShadow"
class=
"bottom-shadow-cell"
:style=
"shadowCellStyles"
></tr>
<epic-item
v-for=
"(epic, index) in epics"
:key=
"index"
...
...
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