mediawiki-extensions-Visual.../modules/ve/ce/nodes/ve.ce.TableCellNode.js
Alexandre Emsenhuber 62e8312535 svn:eol-style native
2012-03-08 12:27:02 +00:00

29 lines
588 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>' ) );
// DOM Changes
this.$
.attr( 'style', model.getElementAttribute( 'html/style' ) )
.addClass( 'es-tableCellView' );
};
/* Registration */
ve.ce.DocumentNode.splitRules.tableCell = {
'self': false,
'children': true
};
/* Inheritance */
ve.extendClass( ve.ce.TableCellNode, ve.ce.BranchNode );