From 7583643907f821ae2a411dbcd705d60c4dff97d7 2014-12-04 16:03:30 From: Nicholas Bollweg (Nick) Date: 2014-12-04 16:03:30 Subject: [PATCH] moving typeset to DOMWidgetView --- diff --git a/IPython/html/static/widgets/js/widget.js b/IPython/html/static/widgets/js/widget.js index 23fa385..e5d51c1 100644 --- a/IPython/html/static/widgets/js/widget.js +++ b/IPython/html/static/widgets/js/widget.js @@ -388,18 +388,6 @@ define(["widgets/js/manager", } else { this.on('displayed', callback, context); } - }, - - typeset: function($el, text){ - // after (optionally) updating a selection's text, check if - // MathJax is available and typeset it - if(arguments.length > 1){ - $el.text(text); - } - if(!window.MathJax){ - return; - } - return MathJax.Hub.Queue(["Typeset", MathJax.Hub, $el.get(0)]); } }); @@ -587,6 +575,18 @@ define(["widgets/js/manager", } return elements; }, + + typeset: function($el, text){ + // after (optionally) updating a selection's text, check if + // MathJax is available and typeset it + if(arguments.length > 1){ + $el.text(text); + } + if(!window.MathJax){ + return; + } + return MathJax.Hub.Queue(["Typeset", MathJax.Hub, $el.get(0)]); + }, });