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
e67c4a6d
Commit
e67c4a6d
authored
Aug 02, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed variable names
parent
b808fdf1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
app/assets/javascripts/fly_out_nav.js
app/assets/javascripts/fly_out_nav.js
+10
-10
No files found.
app/assets/javascripts/fly_out_nav.js
View file @
e67c4a6d
...
...
@@ -7,32 +7,32 @@ export const calculateTop = (boundingRect, outerHeight) => {
};
export
const
showSubLevelItems
=
(
el
)
=>
{
const
$subi
tems
=
el
.
querySelector
(
'
.sidebar-sub-level-items
'
);
const
subI
tems
=
el
.
querySelector
(
'
.sidebar-sub-level-items
'
);
if
(
!
$subi
tems
)
return
;
if
(
!
subI
tems
)
return
;
$subi
tems
.
style
.
display
=
'
block
'
;
subI
tems
.
style
.
display
=
'
block
'
;
el
.
classList
.
add
(
'
is-over
'
);
const
boundingRect
=
el
.
getBoundingClientRect
();
const
top
=
calculateTop
(
boundingRect
,
$subi
tems
.
offsetHeight
);
const
top
=
calculateTop
(
boundingRect
,
subI
tems
.
offsetHeight
);
const
isAbove
=
top
<
boundingRect
.
top
;
$subi
tems
.
style
.
transform
=
`translate3d(0,
${
Math
.
floor
(
top
)}
px, 0)`
;
subI
tems
.
style
.
transform
=
`translate3d(0,
${
Math
.
floor
(
top
)}
px, 0)`
;
if
(
isAbove
)
{
$subi
tems
.
classList
.
add
(
'
is-above
'
);
subI
tems
.
classList
.
add
(
'
is-above
'
);
}
};
export
const
hideSubLevelItems
=
(
el
)
=>
{
const
$subi
tems
=
el
.
querySelector
(
'
.sidebar-sub-level-items
'
);
const
subI
tems
=
el
.
querySelector
(
'
.sidebar-sub-level-items
'
);
if
(
!
$subi
tems
)
return
;
if
(
!
subI
tems
)
return
;
el
.
classList
.
remove
(
'
is-over
'
);
$subi
tems
.
style
.
display
=
'
none
'
;
$subi
tems
.
classList
.
remove
(
'
is-above
'
);
subI
tems
.
style
.
display
=
'
none
'
;
subI
tems
.
classList
.
remove
(
'
is-above
'
);
};
export
default
()
=>
{
...
...
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