Skip to content
This repository has been archived by the owner on Feb 14, 2019. It is now read-only.

Commit

Permalink
Merge pull request #2 from DevExpress/T576518_T579718
Browse files Browse the repository at this point in the history
fix T579718 and T579718
  • Loading branch information
dimarudnev authored Nov 23, 2017
2 parents 829d6e3 + f138656 commit f421b0d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions dist/dashboard-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ var CustomExtensions;
this.showPanelAsync = function (options) {
var def = $.Deferred();
_this.visible(true);
_this.updateDashboardsList();
setTimeout(function () {
options.surfaceLeft = _this.panelWidth;
def.resolve(options);
Expand All @@ -35,7 +36,6 @@ var CustomExtensions;
};
this.switchToViewer = function () {
_this._dashboardControl.switchToViewer();
_this.updateDashboardsList();
};
this.switchToDesigner = function () {
_this._dashboardControl.switchToDesigner();
Expand All @@ -58,7 +58,7 @@ var CustomExtensions;
this.selectedItemKeys.subscribe(function (value) {
if (value.length) {
var newDashboardId = value[0];
if (_this._dashboardControl.dashboardContainer() && _this._dashboardControl.dashboardContainer().id != newDashboardId) {
if (!_this._dashboardControl.dashboardContainer() || _this._dashboardControl.dashboardContainer().id !== newDashboardId) {
_this._dashboardControl.loadDashboard(newDashboardId);
}
}
Expand Down
2 changes: 1 addition & 1 deletion dist/dashboard-panel.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/dashboard-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module CustomExtensions {
this.selectedItemKeys.subscribe(value => {
if(value.length) {
var newDashboardId = value[0];
if(this._dashboardControl.dashboardContainer()&&this._dashboardControl.dashboardContainer().id!=newDashboardId) {
if(!this._dashboardControl.dashboardContainer() || this._dashboardControl.dashboardContainer().id !== newDashboardId) {
this._dashboardControl.loadDashboard(newDashboardId);
}
}
Expand Down Expand Up @@ -102,6 +102,7 @@ module CustomExtensions {
showPanelAsync = (options: DevExpress.Dashboard.IWorkingModeSwitchingOptions) => {
var def = $.Deferred();
this.visible(true);
this.updateDashboardsList();
setTimeout(() => {
options.surfaceLeft = this.panelWidth;
def.resolve(options);
Expand All @@ -119,7 +120,6 @@ module CustomExtensions {
}
switchToViewer = (): void => {
this._dashboardControl.switchToViewer();
this.updateDashboardsList();
}
switchToDesigner = (): void => {
this._dashboardControl.switchToDesigner();
Expand Down

0 comments on commit f421b0d

Please sign in to comment.