Update inspector now it inherits from NodeInspector

Depends on Ib0131c94 in VisualEditor.

Bug: T93592
Change-Id: Ic6538e19693bf7378316eb5462471be59f74678c
This commit is contained in:
Ed Sanders 2015-03-23 15:12:49 +00:00 committed by Jforrester
parent b5e91022fa
commit be96c3d5e0

View File

@ -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();