Просмотр исходного кода

use setTimeout instead of $timeout in pdf scrollhandler

Brian Gough 11 лет назад
Родитель
Сommit
441bc63935
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      services/web/public/coffee/ide/pdfng/directives/pdfViewer.coffee

+ 2 - 2
services/web/public/coffee/ide/pdfng/directives/pdfViewer.coffee

@@ -359,8 +359,8 @@ define [
 						return
 						return
 					#scope.scrolled = true
 					#scope.scrolled = true
 					if scope.scrollHandlerTimeout
 					if scope.scrollHandlerTimeout
-						$timeout.cancel(scope.scrollHandlerTimeout)
-					scope.scrollHandlerTimeout = $timeout scrollHandler, 25
+						clearTimeout(scope.scrollHandlerTimeout)
+					scope.scrollHandlerTimeout = setTimeout scrollHandler, 25
 
 
 				scrollHandler = () ->
 				scrollHandler = () ->
 					renderVisiblePages()
 					renderVisiblePages()