From 7588a73be20420017455023aab36f65ce0bcfc8d Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Tue, 17 Nov 2015 11:22:57 +0100 Subject: [PATCH] SONAR-6874 Improve positioning of issue blocks in the issues page --- .../sonar-web/src/main/js/apps/issues/component-viewer/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/sonar-web/src/main/js/apps/issues/component-viewer/main.js b/server/sonar-web/src/main/js/apps/issues/component-viewer/main.js index 3877b2707fe..06cbc733bf6 100644 --- a/server/sonar-web/src/main/js/apps/issues/component-viewer/main.js +++ b/server/sonar-web/src/main/js/apps/issues/component-viewer/main.js @@ -190,7 +190,8 @@ export default SourceViewer.extend({ scrollToLine: function (line) { var row = this.$('[data-line-number=' + line + ']'), - goal = row.length > 0 ? row.offset().top - 200 : 0; + topOffset = $(window).height() / 2 - 60, + goal = row.length > 0 ? row.offset().top - topOffset : 0; return $(window).scrollTop(goal); }, -- 2.39.5