[#19,routing][m]: introduce Backbone routing and use it for navigation between grid and graph views.
Some substantial other related changes: * Switched DataExplorer view to have element it attaches to passed in rather than being created internally (this was important for FlotGraph to set up correctly). * Also refactored DataExplorer setup somewhat (e.g. got rid of draw function which wasn't needed -- merging necessary parts with initialize) * Substantial refactoring of FlotGraph so that we correctly work around flot's delicateness regarding rendering (element must not be hidden etc -- see comments in code) * Also generally cleaner code
This commit is contained in:
@@ -4,9 +4,9 @@ $(function() {
|
||||
window.$container = $('.data-explorer-here');
|
||||
var dataset = demoDataset();
|
||||
window.dataExplorer = new recline.View.DataExplorer({
|
||||
model: dataset
|
||||
el: window.$container
|
||||
, model: dataset
|
||||
});
|
||||
window.$container.append(window.dataExplorer.el);
|
||||
setupLoadFromWebstore(function(dataset) {
|
||||
window.dataExplorer.remove();
|
||||
window.dataExplorer = null;
|
||||
|
||||
Reference in New Issue
Block a user