@@ -113,10 +113,10 @@ angular.module('ui.scroll', [])
113
113
114
114
buffer
115
115
116
- Padding = (tagName ) ->
117
-
116
+ Padding = (template ) ->
117
+ tagName = template . localName
118
118
if tagName in [' dl' ]
119
- throw new Error ' ui-scroll directive does not support <' + template . localName + ' > as a repeating tag: ' + template .outerHTML
119
+ throw new Error ' ui-scroll directive does not support <' + tagName + ' > as a repeating tag: ' + template .outerHTML
120
120
tagName = ' div' if tagName not in [' li' , ' tr' ]
121
121
122
122
switch tagName
@@ -141,11 +141,11 @@ angular.module('ui.scroll', [])
141
141
142
142
viewport .createPaddingElements = (template ) ->
143
143
144
- topPadding = new Padding template . localName
144
+ topPadding = new Padding template
145
145
element .before topPadding
146
146
viewport .topPadding = (height ) -> topPadding .height height
147
147
148
- bottomPadding = new Padding template . localName
148
+ bottomPadding = new Padding template
149
149
element .after bottomPadding
150
150
viewport .bottomPadding = (height ) -> bottomPadding .height height
151
151
@@ -175,7 +175,7 @@ angular.module('ui.scroll', [])
175
175
compile : (elementTemplate , attr , compileLinker ) ->
176
176
177
177
unless match = attr .uiScroll .match (/ ^ \s * (\w + )\s + in\s + ([\w \. ] + )\s * $ / )
178
- throw new Error ' Expected uiScroll in form of \' _item_ in _datasource_\' but got \' ' + $ attr .uiScroll + ' \' '
178
+ throw new Error ' Expected uiScroll in form of \' _item_ in _datasource_\' but got \' ' + attr .uiScroll + ' \' '
179
179
itemName = match[1 ]
180
180
datasourceName = match[2 ]
181
181
@@ -561,7 +561,7 @@ angular.module('ui.scroll', [])
561
561
562
562
if $attr .adapter # so we have an adapter on $scope
563
563
adapterOnScope = $parse ($attr .adapter )($scope)
564
- if not adapterOnScope
564
+ if not angular . isObject adapterOnScope
565
565
$parse ($attr .adapter ).assign ($scope, {})
566
566
adapterOnScope = $parse ($attr .adapter )($scope)
567
567
angular .extend (adapterOnScope, adapter)
0 commit comments