 
 	.directive( 'uiScrollViewport'
 		[ '$log'
-			 ->
-					controller:
-						[ '$scope', '$element'
-							(scope, element) ->
-								this.viewport = element
-								this
-						]
+			->
+				controller:
+					[ '$scope', '$element'
+						(scope, element) ->
+							this.viewport = element
+							this
+					]
 
 		])
 

						itemName = match[1]
						datasourceName = match[2]

						isDatasource = (datasource) ->
							angular.isObject(datasource) and datasource.get and angular.isFunction(datasource.get)

						getValueChain = (targetScope, target, isSet) ->
							return if not targetScope
							chain = target.match(/^([\w]+)\.(.+)$/)
							if not chain or chain.length isnt 3
								return targetScope[target] = {} if isSet and not angular.isObject(targetScope[target])
								return targetScope[target]
							targetScope[chain[1]] = {} if isSet and not angular.isObject(targetScope[chain[1]])
							return getValueChain(targetScope[chain[1]], chain[2], isSet)

						datasource = getValueChain($scope, datasourceName)

						if !isDatasource datasource
							datasource = $injector.get(datasourceName)
							throw new Error "#{datasourceName} is not a valid datasource" unless isDatasource datasource

						adapterAttr = getValueChain($scope, $attr.adapter, true) if $attr.adapter

						bufferSize = Math.max(3, +$attr.bufferSize || 10)
						bufferPadding = -> viewport.outerHeight() * Math.max(0.1, +$attr.padding || 0.1) # some extra space to initate preload

						scrollHeight = (elem)->
							elem[0].scrollHeight ? elem[0].document.documentElement.scrollHeight

									throw new Error "applyUpdates - #{arg1} is not a valid index or outside of range"
							adjustBuffer(ridActual, inserted)

						if $attr.adapter # so we have an adapter on $scope
							adapterOnScope = getValueChain($scope, $attr.adapter)
							if not adapterOnScope
								setValueChain($scope, $attr.adapter, {})
								adapterOnScope = getValueChain($scope, $attr.adapter)
							angular.extend(adapterOnScope, adapter)
							adapter = adapterOnScope


						# update events (are deprecated since v1.1.0)
