mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-27 07:40:48 +00:00
a2eee63525
Also: * Simplified ve.ce.Surface.getLeafNode, which may be better to just be removed and be used inline in the few places it's being used. * Removed method wrapper for static function ve.ce.Surface.getLeafNode Change-Id: I1d4cf0bb7ecc8f07f030753e40a13ebef7d02daa
29 lines
596 B
JavaScript
29 lines
596 B
JavaScript
/**
|
|
* Creates an ve.ce.TableCellNode object.
|
|
*
|
|
* @class
|
|
* @constructor
|
|
* @extends {ve.ce.BranchNode}
|
|
* @param {ve.dm.TableCellNode} model Table cell model to view
|
|
*/
|
|
ve.ce.TableCellNode = function( model ) {
|
|
// Inheritance
|
|
ve.ce.BranchNode.call( this, model, $( '<td></td>' ) );
|
|
|
|
// DOM Changes
|
|
this.$
|
|
.attr( 'style', model.getElementAttribute( 'html/style' ) )
|
|
.addClass( 've-ce-tableCellNode' );
|
|
};
|
|
|
|
/* Registration */
|
|
|
|
ve.ce.DocumentNode.splitRules.tableCell = {
|
|
'self': false,
|
|
'children': true
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
ve.extendClass( ve.ce.TableCellNode, ve.ce.BranchNode );
|