mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-24 07:34:22 +00:00
VisualEditor: Remove MathJax support
No longer needed. Change-Id: Ibf6277f5cfccd1c689b55be5e4fbd8dbceafacae
This commit is contained in:
parent
abad392272
commit
07c037e897
|
@ -5,7 +5,7 @@
|
|||
* @license The MIT License (MIT); see LICENSE.txt
|
||||
*/
|
||||
|
||||
/*global MathJax, ve, OO */
|
||||
/*global ve, OO */
|
||||
|
||||
/**
|
||||
* ContentEditable MediaWiki math node.
|
||||
|
@ -52,23 +52,15 @@ ve.ce.MWMathNode.prototype.afterRender = function () {
|
|||
var $img,
|
||||
node = this;
|
||||
|
||||
if ( this.$element.is( 'span.tex' ) ) {
|
||||
// MathJax
|
||||
MathJax.Hub.Queue(
|
||||
[ 'Typeset', MathJax.Hub, this.$element[ 0 ] ],
|
||||
[ this, this.emit, 'rerender' ]
|
||||
);
|
||||
$img = this.$element.filter( 'img.tex' );
|
||||
// Rerender after image load
|
||||
if ( $img.length ) {
|
||||
$img.on( 'load', function () {
|
||||
node.emit( 'rerender' );
|
||||
} );
|
||||
} else {
|
||||
$img = this.$element.filter( 'img.tex' );
|
||||
// Rerender after image load
|
||||
if ( $img.length ) {
|
||||
$img.on( 'load', function () {
|
||||
node.emit( 'rerender' );
|
||||
} );
|
||||
} else {
|
||||
// Passing an empty string returns no image, so rerender immediately
|
||||
this.emit( 'rerender' );
|
||||
}
|
||||
// Passing an empty string, or using MathML, returns no image, so rerender immediately
|
||||
this.emit( 'rerender' );
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue