     else if subViewTop - viewTop + subViewHeight > viewHeight
       @scrollTo top : subViewRelTop - viewHeight + subViewHeight
 
+
   fractionOfHeightBelowFold:({view})->
     viewHeight = view.getHeight()
     viewGlobalOffset = view.$().offset().top

require('jquery-mousewheel') $
KDView           = require './../../core/view.coffee'
KDCustomHTMLView = require './../../core/customhtmlview.coffee'
KDScrollThumb    = require './scrollthumb.coffee'
KDScrollTrack    = require './scrolltrack.coffee'

module.exports = class KDScrollView extends KDView

  DIRECTIONS = ['up', 'right', 'down', 'left']

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

    options.ownScrollBars   ?= no
    options.naturalScroll   ?= yes
    options.bind           or= "mouseenter"
    options.isWrapper       ?= no
    options.mouseWheelSpeed ?= 3
    options.cssClass         = KD.utils.curry "kdscrollview", options.cssClass

    super options, data

    { @ownScrollBars, @isWrapper } = @getOptions()

    @once 'viewAppended', @bound '_createScrollBars'  if @ownScrollBars

    @stopScrolling = no
    @on 'click', -> KD.getSingleton('windowController').enableScroll()

      @setScrollTop top
      @setScrollLeft left
      callback?()


  scrollToSubView:(subView)->

