mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-23 22:13:34 +00:00
Add CSS class 'es-ViewBranchNode-firstChild' to all first childs of ViewBranchNode
This commit is contained in:
parent
6f5719e736
commit
bcaa5c2945
|
@ -48,6 +48,9 @@ es.DocumentViewBranchNode.prototype.onAfterPush = function( childModel ) {
|
|||
this.children.push( childView );
|
||||
// Update DOM
|
||||
this.$.append( childView.$ );
|
||||
if ( this.children.length === 1 ) {
|
||||
childView.$.addClass('es-ViewBranchNode-firstChild');
|
||||
}
|
||||
this.emit( 'afterPush', childView );
|
||||
this.emit( 'update' );
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue