mediawiki-extensions-Visual.../modules/ve/ce/ve.ce.LeafNode.js
Catrope 6afed5e5cc Move ve2/ back to ve/
Change-Id: Ie51d8e48171fb1f84045d1560ee603cee62b91f6
2012-06-19 18:20:28 -07:00

28 lines
666 B
JavaScript

/**
* ContentEditable node that can not have any children.
*
* @class
* @abstract
* @constructor
* @extends {ve.LeafNode}
* @extends {ve.ce.Node}
* @param {String} type Symbolic name of node type
* @param model {ve.dm.LeafNode} Model to observe
* @param {jQuery} [$element] Element to use as a container
*/
ve.ce.LeafNode = function( type, model, $element ) {
// Inheritance
ve.LeafNode.call( this );
ve.ce.Node.call( this, type, model, $element );
// DOM Changes
if ( model.isWrapped() ) {
this.$.addClass( 've-ce-leafNode' );
}
};
/* Inheritance */
ve.extendClass( ve.ce.LeafNode, ve.LeafNode );
ve.extendClass( ve.ce.LeafNode, ve.ce.Node );