From a33e8a2d60294d3a71164b6db7fbd77ce818685c Mon Sep 17 00:00:00 2001 From: Rufus Pollock Date: Thu, 5 Jul 2012 22:25:36 +0100 Subject: [PATCH] [demos/multiview][s]: explicitly configure views for multiview (so as to hide timeline which is misehaving at that width/size). --- demos/multiview/app.js | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/demos/multiview/app.js b/demos/multiview/app.js index b127bee7..ffe56255 100755 --- a/demos/multiview/app.js +++ b/demos/multiview/app.js @@ -2,7 +2,10 @@ jQuery(function($) { window.dataExplorer = null; window.explorerDiv = $('.data-explorer-here'); - // see if we have any configuration from query string + // This is some fancy stuff to allow configuring the multiview from + // parameters in the query string + // + // For more on state see the view documentation. var state = recline.View.parseQueryString(decodeURIComponent(window.location.search)); if (state) { _.each(state, function(value, key) { @@ -37,10 +40,42 @@ var createExplorer = function(dataset, state) { var $el = $('
'); $el.appendTo(window.explorerDiv); + var views = [ + { + id: 'grid', + label: 'Grid', + view: new recline.View.SlickGrid({ + model: dataset + }), + }, + { + id: 'graph', + label: 'Graph', + view: new recline.View.Graph({ + model: dataset + }), + }, + { + id: 'map', + label: 'Map', + view: new recline.View.Map({ + model: dataset + }), + }, + { + id: 'transform', + label: 'Transform', + view: new recline.View.Transform({ + model: dataset + }) + } + ]; + window.dataExplorer = new recline.View.MultiView({ model: dataset, el: $el, - state: state + state: state, + views: views }); }