diff options
author | Kushal Pandya <kushal@gitlab.com> | 2016-12-21 10:11:05 +0530 |
---|---|---|
committer | Kushal Pandya <kushal@gitlab.com> | 2016-12-21 13:16:18 +0530 |
commit | 5bab7c57e3e108d603ceb41c53091ebfb027a37e (patch) | |
tree | 7628e47eed3c3537eb6b65eced7e8b7d406b1717 /app | |
parent | 09738ad09843721d0b0849702daf51292a372df1 (diff) | |
download | gitlab-ce-5bab7c57e3e108d603ceb41c53091ebfb027a37e.tar.gz |
Set offset via constant variable
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/build.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/assets/javascripts/build.js b/app/assets/javascripts/build.js index 867238e205e..eeafe436d6c 100644 --- a/app/assets/javascripts/build.js +++ b/app/assets/javascripts/build.js @@ -4,6 +4,7 @@ (function() { var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + var AUTO_SCROLL_OFFSET = 75; this.Build = (function() { Build.interval = null; @@ -174,7 +175,7 @@ this.$autoScrollContainer.hide(); this.$autoScrollStatusText.removeClass('animate'); } else { - this.$autoScrollContainer.css({ top: this.$body.outerHeight() - 75 }).fadeIn(100); + this.$autoScrollContainer.css({ top: this.$body.outerHeight() - AUTO_SCROLL_OFFSET }).fadeIn(100); this.$autoScrollStatusText.addClass('animate'); } } else if (gl.utils.isInViewport(this.$upBuildTrace.get(0)) && !gl.utils.isInViewport(this.$downBuildTrace.get(0))) { // User is at Top of Build Log @@ -189,7 +190,7 @@ this.$scrollBottomBtn.hide(); // Show and Reposition Autoscroll Status Indicator - this.$autoScrollContainer.css({ top: this.$body.outerHeight() - 75 }).fadeIn(100); + this.$autoScrollContainer.css({ top: this.$body.outerHeight() - AUTO_SCROLL_OFFSET }).fadeIn(100); this.$autoScrollStatusText.addClass('animate'); } else if (gl.utils.isInViewport(this.$upBuildTrace.get(0)) && gl.utils.isInViewport(this.$downBuildTrace.get(0))) { // Build Log height is small this.$scrollTopBtn.hide(); |