Skip to content

Commit baaf0a0

Browse files
committed
removed unnecessary code
1 parent 7c141dc commit baaf0a0

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/ui-scroll.coffee

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ angular.module('ui.scroll', [])
2727
'$log', '$injector', '$rootScope', '$timeout', '$q', '$parse'
2828
(console, $injector, $rootScope, $timeout, $q, $parse) ->
2929

30+
log = console.debug || console.log
31+
3032
# Element manipulation routines
3133

3234
insertElement =
3335
(newElement, previousElement) ->
34-
previousElement.after.apply(previousElement, [newElement])
36+
previousElement.after newElement
3537
[]
3638

3739
removeElement = (wrapper) ->
@@ -67,9 +69,6 @@ angular.module('ui.scroll', [])
6769
wrapper.scope.$destroy()
6870
]
6971

70-
71-
# buffer
72-
7372
Buffer = (itemName, $scope, linker)->
7473

7574
buffer = Object.create Array.prototype
@@ -121,8 +120,6 @@ angular.module('ui.scroll', [])
121120

122121
compile: (elementTemplate, attr, compileLinker) ->
123122

124-
log = console.debug || console.log
125-
126123
unless match = attr.uiScroll.match(/^\s*(\w+)\s+in\s+([\w\.]+)\s*$/)
127124
throw new Error 'Expected uiScroll in form of \'_item_ in _datasource_\' but got \'' + $attr.uiScroll + '\''
128125
itemName = match[1]

0 commit comments

Comments
 (0)