Commit a55f37cd by kimth

Problem js runs MathJax only over its own contents rather than full page

parent eb095f38
...@@ -11,7 +11,8 @@ class @Problem ...@@ -11,7 +11,8 @@ class @Problem
$(selector, @el) $(selector, @el)
bind: => bind: =>
MathJax.Hub.Queue ["Typeset", MathJax.Hub] @el.find('.problem > div').each (index, element) =>
MathJax.Hub.Queue ["Typeset", MathJax.Hub, element]
window.update_schematics() window.update_schematics()
...@@ -267,7 +268,9 @@ class @Problem ...@@ -267,7 +268,9 @@ class @Problem
showMethod = @inputtypeShowAnswerMethods[cls] showMethod = @inputtypeShowAnswerMethods[cls]
showMethod(inputtype, display, answers) if showMethod? showMethod(inputtype, display, answers) if showMethod?
MathJax.Hub.Queue ["Typeset", MathJax.Hub] @el.find('.problem > div').each (index, element) =>
MathJax.Hub.Queue ["Typeset", MathJax.Hub, element]
@$('.show').val 'Hide Answer' @$('.show').val 'Hide Answer'
@el.addClass 'showed' @el.addClass 'showed'
@updateProgress response @updateProgress response
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment