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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
e8fcd464
Commit
e8fcd464
authored
8 years ago
by
Annabel Dunstone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check screen width before increasing max position
parent
65a175bb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
app/assets/javascripts/layout_nav.js.coffee
app/assets/javascripts/layout_nav.js.coffee
+2
-4
No files found.
app/assets/javascripts/layout_nav.js.coffee
View file @
e8fcd464
...
...
@@ -3,9 +3,7 @@ class @LayoutNav
$
(
'#scrolling-tabs'
).
on
'scroll'
,
->
currentPosition
=
$
(
this
).
scrollLeft
()
return
if
currentPosition
==
0
if
$
(
'.nav-control'
).
length
maxPosition
=
$
(
this
)[
0
].
scrollWidth
-
$
(
this
).
parent
().
width
()
+
59
else
maxPosition
=
$
(
this
)[
0
].
scrollWidth
-
$
(
this
).
parent
().
width
()
maxPosition
+=
59
if
$
(
'.nav-control'
).
length
and
window
.
innerWidth
>
480
$
(
'.fade-out'
).
toggleClass
(
'end-scroll'
,
currentPosition
is
maxPosition
)
This diff is collapsed.
Click to expand it.
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