mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Fix initial panel state given an error state, fix attempt to destroy error state vis. Closes #247
This commit is contained in:
parent
6791c627d4
commit
756d969e76
2 changed files with 3 additions and 2 deletions
|
@ -82,7 +82,7 @@ define(function (require) {
|
||||||
makePanelSerializeable(panel);
|
makePanelSerializeable(panel);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
safeLayout();
|
||||||
$window.on('resize', safeLayout);
|
$window.on('resize', safeLayout);
|
||||||
$scope.$on('ready:vis', safeLayout);
|
$scope.$on('ready:vis', safeLayout);
|
||||||
};
|
};
|
||||||
|
|
|
@ -141,7 +141,8 @@ define(function (require) {
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.$on('$destroy', function () {
|
$scope.$on('$destroy', function () {
|
||||||
if ($scope.vis) $scope.vis.destroy();
|
// Vis with missing indexpattern will not have destroy
|
||||||
|
if ($scope.vis && $scope.vis.destroy) $scope.vis.destroy();
|
||||||
if (chart) {
|
if (chart) {
|
||||||
chart.off('hover');
|
chart.off('hover');
|
||||||
chart.off('click');
|
chart.off('click');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue