aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js
diff options
context:
space:
mode:
authorStas Vilchik <stas.vilchik@sonarsource.com>2017-08-29 11:38:53 +0200
committerStas Vilchik <stas.vilchik@sonarsource.com>2017-09-13 13:53:58 +0200
commit793e86fce66f356099792b7231c9a1d949ff875e (patch)
tree8bd08099539c3cb1ff159823ee1d1f74a5f2c979 /server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js
parent736e89cc1629e1e52db00f67e4650f1b88695de9 (diff)
downloadsonarqube-793e86fce66f356099792b7231c9a1d949ff875e.tar.gz
sonarqube-793e86fce66f356099792b7231c9a1d949ff875e.zip
update prettier
Diffstat (limited to 'server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js')
-rw-r--r--server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js23
1 files changed, 18 insertions, 5 deletions
diff --git a/server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js b/server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js
index d9d7eb25c31..e9db36ae7b7 100644
--- a/server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js
+++ b/server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js
@@ -74,16 +74,27 @@ export default ModalView.extend({
const radius = options.size / 2;
const container = select(this);
- const svg = container.append('svg').attr('width', options.size).attr('height', options.size);
+ const svg = container
+ .append('svg')
+ .attr('width', options.size)
+ .attr('height', options.size);
const plot = svg.append('g').attr('transform', trans(radius, radius));
- const arc = d3Arc().innerRadius(radius - options.thickness).outerRadius(radius);
- const pie = d3Pie().sort(null).value(d => d);
+ const arc = d3Arc()
+ .innerRadius(radius - options.thickness)
+ .outerRadius(radius);
+ const pie = d3Pie()
+ .sort(null)
+ .value(d => d);
const colors = function(i) {
return i === 0 ? options.color : options.baseColor;
};
const sectors = plot.selectAll('path').data(pie(data));
- sectors.enter().append('path').style('fill', (d, i) => colors(i)).attr('d', arc);
+ sectors
+ .enter()
+ .append('path')
+ .style('fill', (d, i) => colors(i))
+ .attr('d', arc);
});
},
@@ -250,7 +261,9 @@ export default ModalView.extend({
const testId = $(e.currentTarget).data('id');
const url = window.baseUrl + '/api/tests/covered_files';
const options = { testId };
- this.testsScroll = $(e.currentTarget).scrollParent().scrollTop();
+ this.testsScroll = $(e.currentTarget)
+ .scrollParent()
+ .scrollTop();
return $.get(url, options).done(data => {
this.coveredFiles = data.files;
this.selectedTest = this.tests.find(test => test.id === testId);