diff options
author | Phil Hughes <me@iamphill.com> | 2016-06-14 17:53:26 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-06-14 17:53:26 +0100 |
commit | 0b1eea8f970e170cd4314ec75aba9707ffa98127 (patch) | |
tree | aa0fe1e446d79c81a2c8afc83946083639020065 | |
parent | 29130f37ad15bf5aa4ac2cf62d0ea8249218dcd6 (diff) | |
download | gitlab-ce-0b1eea8f970e170cd4314ec75aba9707ffa98127.tar.gz |
Removed console.log
Uses outerWidth instead of width
-rw-r--r-- | app/assets/javascripts/layout_nav.js.coffee | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/app/assets/javascripts/layout_nav.js.coffee b/app/assets/javascripts/layout_nav.js.coffee index f02292dd4f3..f8f0aea427e 100644 --- a/app/assets/javascripts/layout_nav.js.coffee +++ b/app/assets/javascripts/layout_nav.js.coffee @@ -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) |