Removed console.log
Uses outerWidth instead of width
This commit is contained in:
parent
29130f37ad
commit
0b1eea8f97
1 changed files with 3 additions and 8 deletions
|
@ -18,13 +18,8 @@ $ ->
|
|||
|
||||
$('.scrolling-tabs').on 'scroll', (event) ->
|
||||
$this = $(this)
|
||||
$el = $(event.target)
|
||||
currentPosition = $this.scrollLeft()
|
||||
size = bp.getBreakpointSize()
|
||||
controlBtnWidth = $('.controls').width()
|
||||
maxPosition = ($this.get(0).scrollWidth - $this.parent().width()) - 1
|
||||
# maxPosition += controlBtnWidth if size isnt 'xs' and $('.nav-control').length
|
||||
console.log maxPosition, currentPosition
|
||||
maxPosition = $this.prop('scrollWidth') - $this.outerWidth()
|
||||
|
||||
$el.find('.fade-left').toggleClass('end-scroll', currentPosition is 0)
|
||||
$el.find('.fade-right').toggleClass('end-scroll', currentPosition is maxPosition)
|
||||
$this.find('.fade-left').toggleClass('end-scroll', currentPosition is 0)
|
||||
$this.find('.fade-right').toggleClass('end-scroll', currentPosition is maxPosition)
|
||||
|
|
Loading…
Reference in a new issue