ux(dashboard): fixes for changing panel tabs, #6442

This commit is contained in:
Torkel Ödegaard
2016-11-02 21:45:46 +01:00
parent 47aae7f1f2
commit cdea420285
5 changed files with 19 additions and 11 deletions

View File

@@ -84,9 +84,12 @@ function (angular, _, $) {
DashboardViewState.prototype.update = function(state) {
// implement toggle logic
if (this.state.fullscreen && state.fullscreen) {
if (this.state.edit === state.edit) {
state.fullscreen = !state.fullscreen;
if (state.toggle) {
delete state.toggle;
if (this.state.fullscreen && state.fullscreen) {
if (this.state.edit === state.edit) {
state.fullscreen = !state.fullscreen;
}
}
}
@@ -163,7 +166,7 @@ function (angular, _, $) {
if (!render) { return false;}
$timeout(function() {
if (self.oldTimeRange && self.oldTimeRange !== ctrl.range) {
if (self.oldTimeRange !== ctrl.range) {
self.$scope.broadcastRefresh();
} else {
self.$scope.$broadcast('render');