Skip to content

Commit

Permalink
Fix broken toggle pane buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
green3g committed Oct 5, 2016
1 parent 4651249 commit 1fafd15
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions viewer/js/viewer/_LayoutMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ define([
if (panes.hasOwnProperty(key)) {
if (panes[key].collapsible) {
this.collapseButtons[key] = put(this.panes[this.collapseButtonsPane].domNode, 'div.sidebarCollapseButton.sidebar' + key + 'CollapseButton.sidebarCollapseButton' + ((key === 'bottom' || key === 'top') ? 'Vert' : 'Horz') + ' div.dijitIcon.button.close').parentNode;
on(this.collapseButtons[key], 'click', lang.hitch(this, 'togglePane', key));
on(this.collapseButtons[key], 'click', lang.hitch(this, 'togglePane', key, null, false));
this.positionSideBarToggle(key);
if (this.collapseButtonsPane === 'outer') {
var splitter = this.panes[key]._splitterWidget;
Expand Down Expand Up @@ -221,14 +221,14 @@ define([
if (domNode) {
var oldDisp = domStyle.get(domNode, 'display');
var newDisp;

if (typeof(show) === 'string' && (show === 'none' || show === 'block')) {
// Set (CSS Display Property)
newDisp = show;
} else if (typeof(show) === 'boolean') {
// Set (boolean)
newDisp = (show) ? 'block' : 'none';
} else if (show === undefined) {
} else if (show === undefined || show === null) {
// Toggle
newDisp = (oldDisp === 'none') ? 'block' : 'none';
} else {
Expand Down Expand Up @@ -324,4 +324,4 @@ define([

}
});
});
});

0 comments on commit 1fafd15

Please sign in to comment.