From be96c3d5e04080efe975f0b460c0fdadaa995f90 Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Mon, 23 Mar 2015 15:12:49 +0000 Subject: [PATCH] Update inspector now it inherits from NodeInspector Depends on Ib0131c94 in VisualEditor. Bug: T93592 Change-Id: Ic6538e19693bf7378316eb5462471be59f74678c --- modules/VisualEditor/ve.ui.MWMathInspector.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/VisualEditor/ve.ui.MWMathInspector.js b/modules/VisualEditor/ve.ui.MWMathInspector.js index 6bf2736..2c21ceb 100644 --- a/modules/VisualEditor/ve.ui.MWMathInspector.js +++ b/modules/VisualEditor/ve.ui.MWMathInspector.js @@ -35,7 +35,7 @@ ve.ui.MWMathInspector.static.size = 'large'; ve.ui.MWMathInspector.static.title = OO.ui.deferMsg( 'math-visualeditor-mwmathinspector-title' ); -ve.ui.MWMathInspector.static.nodeModel = ve.dm.MWMathNode; +ve.ui.MWMathInspector.static.modelClasses = [ ve.dm.MWMathNode ]; ve.ui.MWMathInspector.static.dir = 'ltr'; @@ -102,7 +102,7 @@ ve.ui.MWMathInspector.prototype.initialize = function () { ve.ui.MWMathInspector.prototype.getSetupProcess = function ( data ) { return ve.ui.MWMathInspector.super.prototype.getSetupProcess.call( this, data ) .next( function () { - var display = this.node.getAttribute( 'mw' ).attrs.display || 'default'; + var display = this.selectedNode.getAttribute( 'mw' ).attrs.display || 'default'; this.displaySelect.selectItem( this.displaySelect.getItemFromData( display ) ); this.displaySelect.on( 'choose', this.onChangeHandler ); this.idInput.on( 'change', this.onChangeHandler ); @@ -124,7 +124,7 @@ ve.ui.MWMathInspector.prototype.getTeardownProcess = function ( data ) { * @inheritdoc */ ve.ui.MWMathInspector.prototype.updatePreview = function () { - var mwData = ve.copy( this.node.getAttribute( 'mw' ) ), + var mwData = ve.copy( this.selectedNode.getAttribute( 'mw' ) ), display = this.displaySelect.getSelectedItem().getData(), id = this.idInput.getValue();