               spliter.elem.remove()
             else
               if spliter.collapsable
-                spliter.preDivBoth = Math.max(preItem.size, 20) / (Math.max(nextItem.size, 20) + Math.max(nextItem.size, 20))
+                spliter.preDivBoth = Math.max(preItem.size, 20) / (Math.max(preItem.size, 20) + Math.max(nextItem.size, 20))
               splitersTmp.push spliter
               @spliterSizeTotal += spliter.size
           @spliters = splitersTmp

            right: 0
            top: 0
            bottom: 0
            overflow: 'hidden'
          }
          layoutOption = $parse(attrs.smartLayout) scope
          @layoutDirection = if layoutOption.direction is 'column' then 'column' else 'row'

              spliterOption = $parse(spliter.elem.attr('layout-spliter'))(scope) ? {}
              collapseOption = $parse(spliter.elem.attr('collapsable'))(scope) ? {}
              spliter.size = parseSize.spliter(spliterOption.size)
              spliter.color = spliterOption.color ? '#333'
              spliter.collapsable = angular.isDefined spliter.elem.attr('collapsable')
              if spliter.collapsable
                spliter.collapsed = false
                spliter.collapseDirection = collapseOption.direction ? 'pre'
                spliter.collapseColor = collapseOption.color ? '#ddd'
                spliter.elem.html '<div style="position: absolute; cursor: pointer"><svg><path /></svg></div>'
                spliter.collapse = spliter.elem.children()
                spliter.collapse.css @sizeType.begin, '50%'
                spliter.collapse.find('svg').css @sizeType.osize, "#{spliter.size * 4}px"
