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
iv
gitlab-ce
Commits
0b1eea8f
Commit
0b1eea8f
authored
Jun 14, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed console.log
Uses outerWidth instead of width
parent
29130f37
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
app/assets/javascripts/layout_nav.js.coffee
app/assets/javascripts/layout_nav.js.coffee
+3
-8
No files found.
app/assets/javascripts/layout_nav.js.coffee
View file @
0b1eea8f
...
...
@@ -18,13 +18,8 @@ $ ->
$
(
'.scrolling-tabs'
).
on
'scroll'
,
(
event
)
->
$this
=
$
(
this
)
$el
=
$
(
event
.
target
)
currentPosition
=
$this
.
scrollLeft
()
size
=
bp
.
getBreakpointSize
()
controlBtnWidth
=
$
(
'.controls'
).
width
()
maxPosition
=
(
$this
.
get
(
0
).
scrollWidth
-
$this
.
parent
().
width
())
-
1
# maxPosition += controlBtnWidth if size isnt 'xs' and $('.nav-control').length
console
.
log
maxPosition
,
currentPosition
maxPosition
=
$this
.
prop
(
'scrollWidth'
)
-
$this
.
outerWidth
()
$
el
.
find
(
'.fade-left'
).
toggleClass
(
'end-scroll'
,
currentPosition
is
0
)
$
el
.
find
(
'.fade-right'
).
toggleClass
(
'end-scroll'
,
currentPosition
is
maxPosition
)
$
this
.
find
(
'.fade-left'
).
toggleClass
(
'end-scroll'
,
currentPosition
is
0
)
$
this
.
find
(
'.fade-right'
).
toggleClass
(
'end-scroll'
,
currentPosition
is
maxPosition
)
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