overleaf/services/web/frontend/js/directives/mathjax.js
Jakob Ackermann e959529828 Merge pull request #15129 from overleaf/mj-jpa-angular-parameters
[web] Explicitly name angular parameters

GitOrigin-RevId: 91beae68989d6c8122132b531a4338b116d87424
2023-10-16 08:04:25 +00:00

15 lines
312 B
JavaScript

/* global MathJax */
import App from '../base'
export default App.directive('mathjax', function () {
return {
link(scope, element, attrs) {
if (!(MathJax && MathJax.Hub)) return
setTimeout(() => {
MathJax.Hub.Queue(['Typeset', MathJax.Hub, element.get(0)])
}, 0)
},
}
})