Skip to content

Commit

Permalink
Fixed a divide by zero error with 0% minimum panel size
Browse files Browse the repository at this point in the history
  • Loading branch information
coderespawn committed Jun 21, 2013
1 parent eaf12d5 commit 8a19e38
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dart/lib/splitter/splitter_panel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ class SplitterPanel {
*/
void setContainerRatio(IDockContainer container, num ratio) {
num splitPanelSize = stackedVertical ? panelElement.client.height : panelElement.client.width;
if (splitPanelSize <= 0) splitPanelSize = 1;

num newContainerSize = splitPanelSize * ratio;
int barSize = stackedVertical ? spiltterBars[0].barElement.client.height : spiltterBars[0].barElement.client.width;

Expand Down

0 comments on commit 8a19e38

Please sign in to comment.