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

						# adapter initializing

						adapter = {}

						applyUpdate = (wrapper, newItems) ->
							inserted = []


						viewportScope = viewport.scope() || $rootScope

						topVisible = (item) ->
							adapter.topVisible = item.scope[itemName]
							adapter.topVisibleElement = item.element
							adapter.topVisibleScope = item.scope
							setValueChain(viewportScope, $attr.topVisible, adapter.topVisible) if $attr.topVisible
							setValueChain(viewportScope, $attr.topVisibleElement, adapter.topVisibleElement) if $attr.topVisibleElement
							setValueChain(viewportScope, $attr.topVisibleScope, adapter.topVisibleScope) if $attr.topVisibleScope
							datasource.topVisible(item) if typeof datasource.topVisible is 'function'

						loading = (value) ->
							adapter.isLoading = value
							setValueChain($scope, $attr.isLoading, value) if $attr.isLoading
							datasource.loading(value) if typeof datasource.loading is 'function'

						ridActual = 0
