     @sizes        = @sizes.slice(0,index).concat(@sizes.slice(index+1))
     @panelsBounds = @panelsBounds.slice(0,index).concat(@panelsBounds.slice(index+1))
 
-    o.minimums.splice index, 1
-    o.maximums.splice index, 1
-    o.views.splice    index, 1 if o.views[index]?
+    @minimums[index] = 0
+    @maximums[index] = @_getSize()
+    o.views[index]   = null  if o.views[index]?
 
   # CREATE RESIZERS
 


  # HELPERS
  _sanitizeSizes:->
    @_setMinsAndMaxs()
    o             = @getOptions()
    nullCount     = 0
    totalOccupied = 0
    splitSize     = @_getSize()

    # newSizes = for size,i in (if @sizes.length > 0 then @sizes else o.sizes)
    newSizes = for size,i in o.sizes
      if size is null
        nullCount++
        null
      else
        panelSize = @_sanitizeSize size
        @_getLegitPanelSize size,i
        # check maxs and mins
        totalOccupied += panelSize
        panelSize

    @sizes = for size in newSizes
      if size is null
        nullSize = (splitSize - totalOccupied) / nullCount
        Math.round nullSize
      else
        Math.round size

    return @sizes

  _sanitizeSize:(size)->
    if "number" is typeof size or /px$/.test(size)
      parseInt size, 10
    else if /%$/.test size
      splitSize = @_getSize()
      splitSize / 100 * parseInt size, 10

  _setMinsAndMaxs:->
    @getOptions().minimums ?= []
    @getOptions().maximums ?= []
    panelAmount = @getOptions().sizes.length or 2
    for i in [0...panelAmount]
      @getOptions().minimums[i] = if @getOptions().minimums[i] then @_sanitizeSize @getOptions().minimums[i] else -1
      @getOptions().maximums[i] = if @getOptions().maximums[i] then @_sanitizeSize @getOptions().maximums[i] else 99999

  _getSize:->
    if @getOptions().type is "vertical" then @getWidth() else @getHeight()

  _setSize:(size)->
    if @getOptions().type is "vertical" then @setWidth size else @setHeight size


  constructor:(options = {},data)->

    options.type      or= "vertical"        # "vertical" or "horizontal"
    options.resizable  ?= yes               # yes or no
    options.sizes     or= ['50%','50%']     # an Array of Strings such as ["50%","50%"] or ["500px","150px",null] and null for the available rest area
    options.minimums  or= [0,0]             # an Array of Strings
    options.maximums  or= ['100%','100%']   # an Array of Strings
    options.views     or= null              # an Array of KDViews
    options.fixed     or= []                # an Array of Booleans
    options.duration  or= 200               # a Number in miliseconds
    options.separator or= null              # a KDView instance or null for default separator
    options.colored    ?= no
    options.animated   ?= yes           # a Boolean
    options.type        = options.type.toLowerCase()
    options.cssClass    = KD.utils.curry "kdsplitview kdsplitview-#{options.type}", options.cssClass

    super options,data

    @panels       = []
    @panelsBounds = []
    @resizers     = []
    @sizes        = []
    @minimums     = []
    @maximums     = []
    @size         = 0

  viewAppended:->

