diff options
author | Annabel Dunstone <annabel.dunstone@gmail.com> | 2016-05-18 09:47:54 -0500 |
---|---|---|
committer | Annabel Dunstone <annabel.dunstone@gmail.com> | 2016-05-25 17:14:28 -0500 |
commit | e8fcd4641a2ef67df2e94b7f161c1a061cd5eb77 (patch) | |
tree | 056dcfede92371ce4d84a70adfa6ce6319c59c84 /app | |
parent | 65a175bbd9d5e5a8f6937bcbee9505c67f168b38 (diff) | |
download | gitlab-ce-e8fcd4641a2ef67df2e94b7f161c1a061cd5eb77.tar.gz |
Check screen width before increasing max position
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/layout_nav.js.coffee | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/assets/javascripts/layout_nav.js.coffee b/app/assets/javascripts/layout_nav.js.coffee index 4586702bc2c..613243427cc 100644 --- a/app/assets/javascripts/layout_nav.js.coffee +++ b/app/assets/javascripts/layout_nav.js.coffee @@ -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 = $(this)[0].scrollWidth - $(this).parent().width() + maxPosition += 59 if $('.nav-control').length and window.innerWidth > 480 $('.fade-out').toggleClass('end-scroll', currentPosition is maxPosition) |