Fix errors on loading saved freeboard
parent
4d0c49596f
commit
a0f205941b
|
@ -151,13 +151,13 @@ function FreeboardModel(datasourcePlugins, widgetPlugins, freeboardUI)
|
|||
|
||||
var sortedPanes = _.sortBy(object.panes, function(pane){
|
||||
|
||||
return getPositionForScreenSize(pane).row;
|
||||
return freeboard._getPositionForScreenSize(pane).row;
|
||||
|
||||
});
|
||||
|
||||
_.each(sortedPanes, function(paneConfig)
|
||||
{
|
||||
var pane = new PaneModel();
|
||||
var pane = new PaneModel(self, widgetPlugins);
|
||||
pane.deserialize(paneConfig);
|
||||
self.panes.push(pane);
|
||||
});
|
||||
|
@ -195,7 +195,7 @@ function FreeboardModel(datasourcePlugins, widgetPlugins, freeboardUI)
|
|||
|
||||
this.clearDashboard = function()
|
||||
{
|
||||
grid._removeAllWidgets();
|
||||
freeboard._removeAllWidgets();
|
||||
|
||||
_.each(self.datasources(), function(datasource)
|
||||
{
|
||||
|
|
|
@ -714,17 +714,23 @@ var freeboard = (function()
|
|||
{
|
||||
developerConsole.showDeveloperConsole();
|
||||
},
|
||||
|
||||
// Temporary measures for FreeboardModel; move these to FreeboardUI.
|
||||
_removeAllWidgets : function()
|
||||
{
|
||||
grid.remove_all_widgets();
|
||||
grid.remove_all_widgets();
|
||||
},
|
||||
_disableGrid : function()
|
||||
{
|
||||
grid.disable();
|
||||
grid.disable();
|
||||
},
|
||||
_enableGrid : function()
|
||||
{
|
||||
grid.enable();
|
||||
grid.enable();
|
||||
},
|
||||
_getPositionForScreenSize : function(paneModel)
|
||||
{
|
||||
return getPositionForScreenSize(paneModel);
|
||||
}
|
||||
};
|
||||
}());
|
||||
|
|
Loading…
Reference in New Issue