replace per-page pdf highlight $watch with highlight event

This commit is contained in:
Brian Gough 2015-01-19 14:25:38 +00:00
parent adab8c6769
commit 906c9114cd
2 changed files with 3 additions and 1 deletions

View file

@ -99,7 +99,7 @@ define [
highlights: highlightsElement
})
scope.$watch 'highlights', (highlights, oldVal) ->
scope.$on 'pdf:highlights', (event, highlights) ->
return unless highlights?
return unless highlights.length > 0
if scope.timeoutHandler

View file

@ -452,6 +452,8 @@ define [
return if !highlights.length
scope.$broadcast 'pdf:highlights', areas
first = highlights[0]
pageNum = scope.pages[first.page].pageNum