From 8a19e38b85f8c22575b1bb513fd7f04ab2cf0594 Mon Sep 17 00:00:00 2001 From: Ali Akbar Date: Fri, 21 Jun 2013 16:46:58 +0530 Subject: [PATCH] Fixed a divide by zero error with 0% minimum panel size --- dart/lib/splitter/splitter_panel.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dart/lib/splitter/splitter_panel.dart b/dart/lib/splitter/splitter_panel.dart index 58ec2eb..0fefd51 100644 --- a/dart/lib/splitter/splitter_panel.dart +++ b/dart/lib/splitter/splitter_panel.dart @@ -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;