Skip to content

Commit aa98ada

Browse files
committed
fix(snapshots): fixed snapshot issue introdiuced yesterday
1 parent 26eeb65 commit aa98ada

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

public/app/core/directives/plugin_component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@ function pluginDirectiveLoader($compile, datasourceSrv, $rootScope, $q, $http, $
211211
// let a binding digest cycle complete before adding to dom
212212
setTimeout(function() {
213213
elem.append(child);
214+
scope.$apply(function() {
215+
scope.$broadcast('refresh');
216+
});
214217
});
215218
}
216219

public/app/features/panel/panel_ctrl.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,15 @@ export class PanelCtrl {
4444
this.pluginName = plugin.name;
4545
}
4646

47-
$scope.$on("refresh", () => this.refresh());
48-
$scope.$on("render", () => this.render());
47+
$scope.$on("refresh", this.refresh.bind(this));
48+
$scope.$on("render", this.render.bind(this));
4949
$scope.$on("$destroy", () => this.events.emit('panel-teardown'));
5050
}
5151

5252
init() {
5353
this.calculatePanelHeight();
54-
5554
this.publishAppEvent('panel-initialized', {scope: this.$scope});
5655
this.events.emit('panel-initialized');
57-
58-
this.refresh();
5956
}
6057

6158
renderingCompleted() {

0 commit comments

Comments
 (0)