diff options
-rw-r--r-- | app/assets/javascripts/layout_nav.js.coffee | 6 | ||||
-rw-r--r-- | app/assets/stylesheets/framework/nav.scss | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/app/assets/javascripts/layout_nav.js.coffee b/app/assets/javascripts/layout_nav.js.coffee index 613243427cc..2f14e3f35ac 100644 --- a/app/assets/javascripts/layout_nav.js.coffee +++ b/app/assets/javascripts/layout_nav.js.coffee @@ -2,8 +2,10 @@ class @LayoutNav $ -> $('#scrolling-tabs').on 'scroll', -> currentPosition = $(this).scrollLeft() - return if currentPosition == 0 + return if currentPosition is 0 + mobileScreenWidth = 480 + controlBtnWidth = $('.controls').width() maxPosition = $(this)[0].scrollWidth - $(this).parent().width() - maxPosition += 59 if $('.nav-control').length and window.innerWidth > 480 + maxPosition += controlBtnWidth if $('.nav-control').length and $(window).width() > mobileScreenWidth $('.fade-out').toggleClass('end-scroll', currentPosition is maxPosition) diff --git a/app/assets/stylesheets/framework/nav.scss b/app/assets/stylesheets/framework/nav.scss index 9f5f2f81b8c..bf5981bef8b 100644 --- a/app/assets/stylesheets/framework/nav.scss +++ b/app/assets/stylesheets/framework/nav.scss @@ -257,6 +257,7 @@ } .fade-out { + visibility: visible; opacity: 1; position: absolute; bottom: 16px; @@ -270,6 +271,7 @@ background: linear-gradient(left, rgba(250, 250, 250, 0.4), $background-color 45%); &.end-scroll { + visibility: hidden; opacity: 0; transition-duration: .3s; } |