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

Commit

Permalink
Use *allowSwitchToDesigner* API
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Kuleshov committed Oct 26, 2017
1 parent b661e93 commit 829d6e3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/dashboard-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ var CustomExtensions;
var toViewerItem = new DevExpress.Dashboard.DashboardToolbarItem("toviewer", function () { return _this.switchToViewer(); });
toViewerItem.template = "dashboard-custom-panel-extension-viewer-button";
toViewerItem.disabled = ko.pureComputed(function () { return !!_this._dashboardControl.dashboard(); });
this.allowSwitchToDesigner(_dashboardControl.params.workingMode !== "ViewerOnly");
this.allowSwitchToDesigner(_dashboardControl.allowSwitchToDesigner);
this._toolbarElement.items.push(toViewerItem);
this.desingerToViewerAction = {
orderNo: 60,
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.

2 changes: 1 addition & 1 deletion src/dashboard-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module CustomExtensions {
toViewerItem.template = "dashboard-custom-panel-extension-viewer-button";
toViewerItem.disabled = ko.pureComputed(() => !!this._dashboardControl.dashboard());

this.allowSwitchToDesigner(_dashboardControl.params.workingMode !== "ViewerOnly");
this.allowSwitchToDesigner(_dashboardControl.allowSwitchToDesigner);

this._toolbarElement.items.push(toViewerItem);

Expand Down

0 comments on commit 829d6e3

Please sign in to comment.