]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Only update the size of boxes that are not full width 2343/head
authorEvert Timberg <evert.timberg+github@gmail.com>
Sun, 24 Apr 2016 12:20:36 +0000 (08:20 -0400)
committerEvert Timberg <evert.timberg+github@gmail.com>
Sun, 24 Apr 2016 12:20:36 +0000 (08:20 -0400)
src/core/core.layoutService.js
src/core/core.legend.js

index 0da922074a680f7ae4f5677a88fc93203cd6bf4e..700ecfd5315f2a11445f66da20d3c818f5ed94c6 100644 (file)
@@ -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;
index 4c0ea48761f462dd19d246bf278e7c6a213950a5..c54e2ef1460ab180d2091195f8bf76bd2dbbad64 100644 (file)
@@ -99,7 +99,6 @@ module.exports = function(Chart) {
                        this.afterUpdate();
 
                        return this.minSize;
-
                },
                afterUpdate: helpers.noop,