From baf992bccb192d9a2e7240fd64277056d948544f Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Sun, 17 Dec 2017 20:46:11 +0100 Subject: [PATCH] admin: fix camembert size overflow --- admin/static/js/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/static/js/app.js b/admin/static/js/app.js index 3d6f65b1..bf2a4439 100644 --- a/admin/static/js/app.js +++ b/admin/static/js/app.js @@ -974,7 +974,7 @@ angular.module("FICApp") }); function solvedByLevelPie(location, data) { - var width = d3.select(location).node().getBoundingClientRect().width - 10, + var width = d3.select(location).node().getBoundingClientRect().width - parseInt(d3.select(location).style("padding-right")) - parseInt(d3.select(location).style("padding-left")), height = d3.select(location).node().getBoundingClientRect().width - 10, radius = Math.min(width, height) / 2, innerRadius = 0.1 * radius; @@ -1045,7 +1045,7 @@ function solvedByLevelPie(location, data) { } function solvedByThemesPie(location, data) { - var width = d3.select(location).node().getBoundingClientRect().width, + var width = d3.select(location).node().getBoundingClientRect().width - parseInt(d3.select(location).style("padding-right")) - parseInt(d3.select(location).style("padding-left")), height = d3.select(location).node().getBoundingClientRect().width, radius = Math.min(width, height) / 2, innerRadius = 0.1 * radius;