mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-25 13:41:12 +00:00
replace per-page pdf highlight $watch with highlight event
This commit is contained in:
parent
adab8c6769
commit
906c9114cd
2 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -452,6 +452,8 @@ define [
|
|||
|
||||
return if !highlights.length
|
||||
|
||||
scope.$broadcast 'pdf:highlights', areas
|
||||
|
||||
first = highlights[0]
|
||||
|
||||
pageNum = scope.pages[first.page].pageNum
|
||||
|
|
Loading…
Reference in a new issue