remove useless scope.$apply in pdf scrollhandler

This commit is contained in:
Brian 2015-01-20 15:37:11 +00:00
parent 721843695b
commit 53e9086094

View file

@ -364,11 +364,11 @@ define [
scrollHandler = () -> scrollHandler = () ->
renderVisiblePages() renderVisiblePages()
scope.$apply() #scope.$apply()
newPosition = ctrl.getPdfPosition() newPosition = ctrl.getPdfPosition()
if newPosition? if newPosition?
scope.position = newPosition scope.position = newPosition
scope.$apply() #scope.$apply()
scope.scrollHandlerTimeout = null scope.scrollHandlerTimeout = null
scope.$watch 'pdfSrc', (newVal, oldVal) -> scope.$watch 'pdfSrc', (newVal, oldVal) ->