Just set highlighter if element is visible.
This commit is contained in:
parent
19a2e5f8de
commit
736feb62b6
1 changed files with 7 additions and 3 deletions
|
@ -46,7 +46,7 @@ class ArticleViewItem extends App.Controller
|
|||
return if data.ticket_id.toString() isnt @ticket.id.toString()
|
||||
|
||||
# set highlighter
|
||||
@highligher.loadHighlights(@ticket_article_id)
|
||||
@setHighlighter()
|
||||
|
||||
if !@shown
|
||||
|
||||
|
@ -62,6 +62,10 @@ class ArticleViewItem extends App.Controller
|
|||
release: =>
|
||||
App.TicketArticle.unsubscribe(@subscribeId)
|
||||
|
||||
setHighlighter: =>
|
||||
return if !@el.is(':visible')
|
||||
@highligher.loadHighlights(@ticket_article_id)
|
||||
|
||||
hasChanged: (article) =>
|
||||
|
||||
# if no last article exists, remember it and return true
|
||||
|
@ -122,11 +126,11 @@ class ArticleViewItem extends App.Controller
|
|||
article: @article
|
||||
)
|
||||
|
||||
# set see more option
|
||||
# set see more
|
||||
@setSeeMore()
|
||||
|
||||
# set highlighter
|
||||
@highligher.loadHighlights(@ticket_article_id)
|
||||
@setHighlighter()
|
||||
|
||||
# set see more options
|
||||
setSeeMore: =>
|
||||
|
|
Loading…
Reference in a new issue