From 2efb974189622c80bd422020fd38eb9db85a99e2 Mon Sep 17 00:00:00 2001 From: etimberg Date: Sat, 21 Nov 2015 22:10:39 -0500 Subject: [PATCH] ensure that fullwidth boxes are at very top / bottom --- src/core/core.layoutService.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 -- 2.47.3