Commit ec6d456b authored by Annabel Dunstone's avatar Annabel Dunstone

Change to xs breakpoint, layout_nav updates

parent 79f890ca
class @LayoutNav class @LayoutNav
$ -> $ ->
$('.fade-left').addClass('end-scroll') $('.fade-left').addClass('end-scroll')
$('.scrolling-tabs').scroll (event) -> $('.scrolling-tabs').on 'scroll', (event) ->
el = $(event.target) $this = $(this)
currentPosition = $(this).scrollLeft() $el = $(event.target)
mobileScreenWidth = 480 currentPosition = $this.scrollLeft()
size = bp.getBreakpointSize()
controlBtnWidth = $('.controls').width() controlBtnWidth = $('.controls').width()
maxPosition = $(this)[0].scrollWidth - $(this).parent().width() maxPosition = $this.get(0).scrollWidth - $this.parent().width()
maxPosition += controlBtnWidth if $('.nav-control').length and $(window).width() > mobileScreenWidth maxPosition += controlBtnWidth if size isnt 'xs' and $('.nav-control').length
el.find('.fade-left').toggleClass('end-scroll', currentPosition is 0) $el.find('.fade-left').toggleClass('end-scroll', currentPosition is 0)
el.find('.fade-right').toggleClass('end-scroll', currentPosition is maxPosition) $el.find('.fade-right').toggleClass('end-scroll', currentPosition is maxPosition)
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
visibility: visible; visibility: visible;
opacity: 1; opacity: 1;
position: absolute; position: absolute;
bottom: 16px; bottom: 12px;
width: 43px; width: 43px;
height: 30px; height: 30px;
transition-duration: .3s; transition-duration: .3s;
...@@ -240,7 +240,7 @@ ...@@ -240,7 +240,7 @@
float: right; float: right;
padding: 7px 0 0; padding: 7px 0 0;
@media (max-width: $screen-xs-min) { @media (max-width: $screen-xs-max) {
display: none; display: none;
} }
...@@ -310,7 +310,6 @@ ...@@ -310,7 +310,6 @@
.nav-control { .nav-control {
.fade-right { .fade-right {
right: 58px;
@media (min-width: $screen-xs-max) { @media (min-width: $screen-xs-max) {
right: 67px; right: 67px;
......
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