 
 
   handleDrag:->
-
     size        = @getSize()
     offset      = @getOffset()
-    trackSize   = @getTrackSize()
+    thumbDiff   = @getSize(yes) + @size # in case of given min-height/width with css
+    trackSize   = @getTrackSize() - thumbDiff
     availOffset = trackSize - size
     ratio       = Math.min Math.max(0, offset/availOffset), 1
 

    @setSize @trackSize * @trackSize / @scrollSize


  calculatePosition:(event)->

    ratio = @getScrollOffset() / @getScrollSize()
    @setTrackVisibility()
    @setOffset @getTrackSize() * ratio


  setTrackVisibility: ->

    @size = size


  getSize: (force) ->

    if @size and not force then @size
    else if @isVertical()
    then @getHeight()
    else @getWidth()
