     view.appendChild result
     view
 
-  # Animations
-
-  fadeIn: (view) ->
-    view.classList.add 'ink-hide'
-    setTimeout (-> view.classList.remove 'ink-hide'), 0
-    view
-
-  fadeOut: (view) ->
-    view.classList.add 'ink-hide'
-    setTimeout (-> view.parentElement?.removeChild(view)), 100
-    view
-
-  slideIn: (view) ->
-    h = view.clientHeight
-    view.style.height = '0'
-    setTimeout (-> view.style.height = h + 'px'), 0
-    setTimeout (-> view.style.height = ''), 100
-    view
-
   setIcon: (cell, name) ->
     gutter = cell.querySelector '.gutter'
     icon = cell.querySelector '.icon'

      delta = input.offsetTop - @scrollTop - target
      @scrollTop += delta
    requestAnimationFrame (t) =>
      if t > @isScrolling
        @isScrolling = false
      else
        @_lock input, target

  lock: (time) ->
    scrolling = @isScrolling
    @isScrolling = performance.now() + time
    if not scrolling
      input = @lastCell()
      target = input.offsetTop - @scrollTop
      @_lock input, target

module.exports = ConsoleElement = document.registerElement 'ink-console', prototype: ConsoleElement.prototype

    return 0 unless @lastDivider()?
    @lastDivider().offsetTop - @clientHeight + 8

  scroll: ->
    target = @scrollEndValue()
    delta = target-@scrollTop
    if delta > 0 then @scrollTop += delta
    @focusLast()

  isLocked: false

  _lock: (input, target) ->
    if input.offsetTop + input.clientHeight + 10 <
