mediawiki-extensions-Visual.../modules/ve/ce/ve.ce.LeafNode.js
Trevor Parscal 944228aec7 Whitespace and comments
* Added documentation for ve.AnnotationSet
* Replaced uses of "// Inheritance" with "// parent Constructor"
* Added "// Mixin constructor" where needed
* Added missing section comments like "/* Static Methods */"
* Cleaned up excessive newlines (matching /\n\n\n/g)
* Put unnecessarily multi-line statements on a single line

Change-Id: I2c9b47ba296f7dd3c9cc2985581fbcefd6d76325
2012-09-17 16:53:03 -07:00

37 lines
866 B
JavaScript

/**
* VisualEditor content editable LeafNode class.
*
* @copyright 2011-2012 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
/**
* ContentEditable node that can not have any children.
*
* @class
* @abstract
* @constructor
* @extends {ve.ce.Node}
* @param {String} type Symbolic name of node type
* @param {ve.dm.LeafNode} model Model to observe
* @param {jQuery} [$element] Element to use as a container
*/
ve.ce.LeafNode = function VeCeLeafNode( type, model, $element ) {
// Mixin constructor
ve.LeafNode.call( this );
// Parent constructor
ve.ce.Node.call( this, type, model, $element );
// DOM Changes
if ( model.isWrapped() ) {
this.$.addClass( 've-ce-leafNode' );
}
};
/* Inheritance */
ve.inheritClass( ve.ce.LeafNode, ve.ce.Node );
ve.mixinClass( ve.ce.LeafNode, ve.LeafNode );