From 910e3240b61aedafe4710a34092df22e85d9ff1d Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Thu, 20 Nov 2014 02:51:40 +0000 Subject: [PATCH] ve.ce.MWMathNode: Remove reference to defunct ve.bind Bug: 73627 Change-Id: I3dd6b520a24e5cecb272de8f9a4aa0ba231bee58 --- modules/VisualEditor/ve.ce.MWMathNode.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/VisualEditor/ve.ce.MWMathNode.js b/modules/VisualEditor/ve.ce.MWMathNode.js index 971a6b9..1caf58b 100644 --- a/modules/VisualEditor/ve.ce.MWMathNode.js +++ b/modules/VisualEditor/ve.ce.MWMathNode.js @@ -48,7 +48,8 @@ ve.ce.MWMathNode.prototype.onParseSuccess = function ( deferred, response ) { /** */ ve.ce.MWMathNode.prototype.afterRender = function () { - var $img; + var $img, + node = this; if ( this.$element.is( 'span.tex' ) ) { // MathJax @@ -60,9 +61,9 @@ ve.ce.MWMathNode.prototype.afterRender = function () { $img = this.$element.filter( 'img.tex' ); // Rerender after image load if ( $img.length ) { - $img.on( 'load', ve.bind( function () { - this.emit( 'rerender' ); - }, this ) ); + $img.on( 'load', function () { + node.emit( 'rerender' ); + } ); } else { // Passing an empty string returns no image, so rerender immediately this.emit( 'rerender' );