diff options
author | Annabel Dunstone <annabel.dunstone@gmail.com> | 2016-05-18 19:38:12 +0300 |
---|---|---|
committer | Annabel Dunstone <annabel.dunstone@gmail.com> | 2016-05-26 01:14:28 +0300 |
commit | 77c7fb1469446c76c84ce5883d99e0e3debaf515 (patch) | |
tree | 7c7beb32479b21b743eacd7044a7b806cdb584eb /app/assets/javascripts/layout_nav.js.coffee | |
parent | 7876d27db8b330f3c5e306f1c2e657a8b0df8819 (diff) |
Fix coffeescript; remove fade out div so area is clickable; remove scrollbar on chrome
Diffstat (limited to 'app/assets/javascripts/layout_nav.js.coffee')
-rw-r--r-- | app/assets/javascripts/layout_nav.js.coffee | 6 |
1 files changed, 4 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) |