r103020 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103019‎ | r103020 | r103021 >
Date:20:00, 14 November 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Only re-render nodes that were inserted
Modified paths:
  • /trunk/extensions/VisualEditor/modules/es/bases/es.DocumentViewBranchNode.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/es/bases/es.DocumentViewBranchNode.js
@@ -69,7 +69,7 @@
7070 this.$.prepend( childView.$ );
7171 this.emit( 'afterUnshift', childView );
7272 this.emit( 'update' );
73 - this.renderContent();
 73+ childView.renderContent();
7474 };
7575
7676 es.DocumentViewBranchNode.prototype.onAfterPop = function() {
@@ -82,7 +82,7 @@
8383 childView.$.detach();
8484 this.emit( 'afterPop' );
8585 this.emit( 'update' );
86 - this.renderContent();
 86+ childView.renderContent();
8787 };
8888
8989 es.DocumentViewBranchNode.prototype.onAfterShift = function() {
@@ -95,7 +95,7 @@
9696 childView.$.detach();
9797 this.emit( 'afterShift' );
9898 this.emit( 'update' );
99 - this.renderContent();
 99+ childView.renderContent();
100100 };
101101
102102 es.DocumentViewBranchNode.prototype.onAfterSplice = function( index, howmany ) {
@@ -132,7 +132,11 @@
133133 }
134134 }
135135 this.emit.apply( this, ['afterSplice'].concat( args ) );
136 - this.renderContent();
 136+ if ( args.length >= 3 ) {
 137+ for ( i = 2, length = args.length; i < length; i++ ) {
 138+ args[i] = args[i].renderContent();
 139+ }
 140+ }
137141 };
138142
139143 es.DocumentViewBranchNode.prototype.onAfterSort = function() {

Status & tagging log