From: etimberg Date: Sun, 22 Nov 2015 03:10:39 +0000 (-0500) Subject: ensure that fullwidth boxes are at very top / bottom X-Git-Tag: 2.0.0-beta2~25^2~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2efb974189622c80bd422020fd38eb9db85a99e2;p=thirdparty%2FChart.js.git ensure that fullwidth boxes are at very top / bottom --- diff --git a/src/core/core.layoutService.js b/src/core/core.layoutService.js index fed4d0b9b..51e773fba 100644 --- a/src/core/core.layoutService.js +++ b/src/core/core.layoutService.js @@ -54,6 +54,18 @@ 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); + }); + bottomBoxes.sort(function(a, b) { + return (a.options.fullWidth ? 1 : 0) - (b.options.fullWidth ? 1 : 0); + }); + // Essentially we now have any number of boxes on each of the 4 sides. // Our canvas looks like the following. // The areas L1 and L2 are the left axes. R1 is the right axis, T1 is the top axis and