coderespawn / dock-spawn

Dock Spawn is a web based dock layout engine that aids in creating flexible user interfaces by enabling panels to be docked on the screen similar to Visual Studio IDE
http://dockspawn.com
MIT License
255 stars 76 forks source link

Exception in Dock-spawn for Dart #9

Closed tejainece closed 11 years ago

tejainece commented 11 years ago

I am getting an exception in Dart version of Dock-Spawn due to integer division by zero.

The Exception: Breaking on exception: Unsupported operation: Infinity or NaN toInt

Where: lib/splitter/splitter_panel.dart Line no:94

For the time being I fixed it by adding the following in line 80: if (otherPanelScaleMultipler.isInfinite || otherPanelScaleMultipler.isNaN){ otherPanelScaleMultipler = 1; }

I am not sure if thats the fix. I am just saturating otherPanelScaleMultipler to max possible value.

coderespawn commented 11 years ago

Hi Ravi, Thanks for the bug report. I've fix the issue to make sure the division doesn't happen with zero

Ali