Commit 77c7fb14 authored by Annabel Dunstone's avatar Annabel Dunstone

Fix coffeescript; remove fade out div so area is clickable; remove scrollbar on chrome

parent 7876d27d
......@@ -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)
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment