mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-11 05:56:11 +00:00
29 lines
601 B
JavaScript
29 lines
601 B
JavaScript
/**
|
|
* Creates an es.TableCellView object.
|
|
*
|
|
* @class
|
|
* @constructor
|
|
* @extends {es.DocumentViewBranchNode}
|
|
* @param {es.TableCellModel} model Table cell model to view
|
|
*/
|
|
es.TableCellView = function( model ) {
|
|
// Inheritance
|
|
es.DocumentViewBranchNode.call( this, model, $( '<td>' ) );
|
|
|
|
// DOM Changes
|
|
this.$
|
|
.attr( 'style', model.getElementAttribute( 'html/style' ) )
|
|
.addClass( 'es-tableCellView' );
|
|
};
|
|
|
|
/* Registration */
|
|
|
|
es.DocumentModel.nodeRules.tableCell = {
|
|
'self': false,
|
|
'children': true
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
es.extendClass( es.TableCellView, es.DocumentViewBranchNode );
|