     ])
 
   .directive( 'ngScroll'
-    [ '$log', '$injector', '$timeout'
-      (console, $injector, $timeout) ->
+    [ '$log', '$injector'
+      (console, $injector) ->
         require: ['?^ngScrollViewport', '?^ngScrollCanvas']
         transclude: 'element'
         priority: 1000

                    buffer[0].element.offset().top - canvas.offset().top > viewport.scrollTop() - bufferPadding()

                clipTop = ->
                  # clip off the invisible items form the top
                  topHeight = topPadding.height()
                  overage = 0
                  for item in buffer

                  #globals.doPositioning && globals.selectedText &&
                  #(buffer.length == 0 || scope.defaultText(buffer[buffer.length-1]).toLowerCase() <= globals.selectedText.toLowerCase()) ||
                  # and we have enough for the scrollbar to show up

                  item = buffer[buffer.length-1]
                  !eof && item.element.offset().top - canvas.offset().top + item.element.outerHeight(true) <
                    viewport.scrollTop() + viewport.height() + bufferPadding()

                clipBottom = ->
                    # clip the invisible items off the bottom
                  bottomHeight = bottomPadding.height()
                  overage = 0

                  for item in buffer[..].reverse()
                    if viewport.scrollTop() + viewport.height() + bufferPadding() < item.element.offset().top - canvas.offset().top
                      bottomHeight += item.element.outerHeight(true)
                      overage++
                      eof = false
                    else
