summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKushal Pandya <kushal@gitlab.com>2016-12-21 10:11:05 +0530
committerKushal Pandya <kushal@gitlab.com>2016-12-21 13:16:18 +0530
commit5bab7c57e3e108d603ceb41c53091ebfb027a37e (patch)
tree7628e47eed3c3537eb6b65eced7e8b7d406b1717
parent09738ad09843721d0b0849702daf51292a372df1 (diff)
downloadgitlab-ce-5bab7c57e3e108d603ceb41c53091ebfb027a37e.tar.gz
Set offset via constant variable
-rw-r--r--app/assets/javascripts/build.js5
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();