2012-07-19 00:11:26 +00:00
|
|
|
/**
|
|
|
|
* VisualEditor content editable LeafNode class.
|
2012-07-19 21:25:16 +00:00
|
|
|
*
|
2012-07-19 00:11:26 +00:00
|
|
|
* @copyright 2011-2012 VisualEditor Team and others; see AUTHORS.txt
|
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
2012-02-10 16:57:02 +00:00
|
|
|
/**
|
2012-06-20 01:20:28 +00:00
|
|
|
* ContentEditable node that can not have any children.
|
|
|
|
*
|
2012-02-10 16:57:02 +00:00
|
|
|
* @class
|
|
|
|
* @abstract
|
|
|
|
* @constructor
|
|
|
|
* @extends {ve.LeafNode}
|
2012-03-06 22:39:43 +00:00
|
|
|
* @extends {ve.ce.Node}
|
2012-06-20 01:20:28 +00:00
|
|
|
* @param {String} type Symbolic name of node type
|
|
|
|
* @param model {ve.dm.LeafNode} Model to observe
|
2012-02-10 16:57:02 +00:00
|
|
|
* @param {jQuery} [$element] Element to use as a container
|
|
|
|
*/
|
2012-08-07 01:50:44 +00:00
|
|
|
ve.ce.LeafNode = function ( type, model, $element ) {
|
2012-02-10 16:57:02 +00:00
|
|
|
// Inheritance
|
|
|
|
ve.LeafNode.call( this );
|
2012-06-20 01:20:28 +00:00
|
|
|
ve.ce.Node.call( this, type, model, $element );
|
2012-02-10 16:57:02 +00:00
|
|
|
|
2012-06-20 01:20:28 +00:00
|
|
|
// DOM Changes
|
|
|
|
if ( model.isWrapped() ) {
|
|
|
|
this.$.addClass( 've-ce-leafNode' );
|
|
|
|
}
|
2012-02-10 22:19:12 +00:00
|
|
|
};
|
|
|
|
|
2012-02-10 16:57:02 +00:00
|
|
|
/* Inheritance */
|
|
|
|
|
2012-06-22 17:50:41 +00:00
|
|
|
ve.extendClass( ve.ce.LeafNode, ve.LeafNode, ve.ce.Node );
|