mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-12-01 02:36:47 +00:00
fcf045f832
Moved from the VisualEditor extension, where it was removed in Iab0c56246626de1e0f Change-Id: I8e582ee6deadc2750d30b49f0c6de31ed9c16a50
40 lines
890 B
JavaScript
40 lines
890 B
JavaScript
/*!
|
|
* VisualEditor DataModel MWMathNode class.
|
|
*
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/*global ve, OO */
|
|
|
|
/**
|
|
* DataModel MediaWiki math node.
|
|
*
|
|
* @class
|
|
* @extends ve.dm.MWExtensionNode
|
|
*
|
|
* @constructor
|
|
* @param {number} [length] Length of content data (ignored, forced to 0)
|
|
* @param {Object} [element] Reference to element in linear model
|
|
*/
|
|
ve.dm.MWMathNode = function VeDmMWMathNode( length, element ) {
|
|
// Parent constructor
|
|
ve.dm.MWExtensionNode.call( this, 0, element );
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
OO.inheritClass( ve.dm.MWMathNode, ve.dm.MWExtensionNode );
|
|
|
|
/* Static members */
|
|
|
|
ve.dm.MWMathNode.static.name = 'mwMath';
|
|
|
|
ve.dm.MWMathNode.static.tagName = 'img';
|
|
|
|
ve.dm.MWMathNode.static.extensionName = 'math';
|
|
|
|
/* Registration */
|
|
|
|
ve.dm.modelRegistry.register( ve.dm.MWMathNode );
|