[demos/multiview][s]: explicitly configure views for multiview (so as to hide timeline which is misehaving at that width/size).
This commit is contained in:
@@ -2,7 +2,10 @@ jQuery(function($) {
|
|||||||
window.dataExplorer = null;
|
window.dataExplorer = null;
|
||||||
window.explorerDiv = $('.data-explorer-here');
|
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));
|
var state = recline.View.parseQueryString(decodeURIComponent(window.location.search));
|
||||||
if (state) {
|
if (state) {
|
||||||
_.each(state, function(value, key) {
|
_.each(state, function(value, key) {
|
||||||
@@ -37,10 +40,42 @@ var createExplorer = function(dataset, state) {
|
|||||||
var $el = $('<div />');
|
var $el = $('<div />');
|
||||||
$el.appendTo(window.explorerDiv);
|
$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({
|
window.dataExplorer = new recline.View.MultiView({
|
||||||
model: dataset,
|
model: dataset,
|
||||||
el: $el,
|
el: $el,
|
||||||
state: state
|
state: state,
|
||||||
|
views: views
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user