From 38812cd3c4ea88bff17184cbe090aba0892d9143 Mon Sep 17 00:00:00 2001 From: Evert Timberg Date: Sun, 24 Apr 2016 08:20:36 -0400 Subject: [PATCH] Only update the size of boxes that are not full width --- src/core/core.layoutService.js | 12 ++++++------ src/core/core.legend.js | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/core/core.layoutService.js b/src/core/core.layoutService.js index 0da922074..700ecfd53 100644 --- a/src/core/core.layoutService.js +++ b/src/core/core.layoutService.js @@ -53,10 +53,6 @@ module.exports = function(Chart) { return box.options.position === "chartArea"; }); - function fullWidthSorter(a, b) { - - } - // Ensure that full width boxes are at the very top / bottom topBoxes.sort(function(a, b) { return (b.options.fullWidth ? 1 : 0) - (a.options.fullWidth ? 1 : 0); @@ -253,11 +249,15 @@ module.exports = function(Chart) { }); helpers.each(topBoxes, function(box) { - box.width = newMaxChartAreaWidth; + if (!box.options.fullWidth) { + box.width = newMaxChartAreaWidth; + } }); helpers.each(bottomBoxes, function(box) { - box.width = newMaxChartAreaWidth; + if (!box.options.fullWidth) { + box.width = newMaxChartAreaWidth; + } }); maxChartAreaHeight = newMaxChartAreaHeight; diff --git a/src/core/core.legend.js b/src/core/core.legend.js index 4c0ea4876..c54e2ef14 100644 --- a/src/core/core.legend.js +++ b/src/core/core.legend.js @@ -99,7 +99,6 @@ module.exports = function(Chart) { this.afterUpdate(); return this.minSize; - }, afterUpdate: helpers.noop, -- 2.47.2