Let the browser paint the page before highlighting code

pull/417/merge
Thibaut Courouble 9 years ago
parent b088c3b2ed
commit 75b80a05fd

@ -13,7 +13,8 @@ class app.views.BasePage extends app.View
@prepare?() unless fromCache
@activate()
@delay @afterRender if @afterRender
$.requestAnimationFrame(@paintCode) if @highlightNodes.length > 0
if @highlightNodes.length > 0
$.requestAnimationFrame => $.requestAnimationFrame(@paintCode)
return
highlightCode: (el, language) ->

Loading…
Cancel
Save