From 2d400bdc7ec90a3cacbdbc3f7b749c686c1ac95f Mon Sep 17 00:00:00 2001 From: Joseph Guillaume Date: Thu, 15 Mar 2018 11:32:56 +0200 Subject: [PATCH] Analysis.getRanges respects order of vars --- inst/www/model.js | 1 + 1 file changed, 1 insertion(+) diff --git a/inst/www/model.js b/inst/www/model.js index 1ac4ebb..eb5527d 100644 --- a/inst/www/model.js +++ b/inst/www/model.js @@ -165,6 +165,7 @@ var Analysis = Backbone.Model.extend({ // Return appropriate elements return($.inArray(e[0],vars)>-1); }); + ranges.sort((e) => $.inArray(e[0],vars)); if(asArray){ return(ranges); } ranges = { Variable:ranges.map(function(x){return x[0];}),