Commit aa98ada1 by Torkel Ödegaard

fix(snapshots): fixed snapshot issue introdiuced yesterday

parent 26eeb657
...@@ -211,6 +211,9 @@ function pluginDirectiveLoader($compile, datasourceSrv, $rootScope, $q, $http, $ ...@@ -211,6 +211,9 @@ function pluginDirectiveLoader($compile, datasourceSrv, $rootScope, $q, $http, $
// let a binding digest cycle complete before adding to dom // let a binding digest cycle complete before adding to dom
setTimeout(function() { setTimeout(function() {
elem.append(child); elem.append(child);
scope.$apply(function() {
scope.$broadcast('refresh');
});
}); });
} }
......
...@@ -44,18 +44,15 @@ export class PanelCtrl { ...@@ -44,18 +44,15 @@ export class PanelCtrl {
this.pluginName = plugin.name; this.pluginName = plugin.name;
} }
$scope.$on("refresh", () => this.refresh()); $scope.$on("refresh", this.refresh.bind(this));
$scope.$on("render", () => this.render()); $scope.$on("render", this.render.bind(this));
$scope.$on("$destroy", () => this.events.emit('panel-teardown')); $scope.$on("$destroy", () => this.events.emit('panel-teardown'));
} }
init() { init() {
this.calculatePanelHeight(); this.calculatePanelHeight();
this.publishAppEvent('panel-initialized', {scope: this.$scope}); this.publishAppEvent('panel-initialized', {scope: this.$scope});
this.events.emit('panel-initialized'); this.events.emit('panel-initialized');
this.refresh();
} }
renderingCompleted() { renderingCompleted() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment