r103269 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103268‎ | r103269 | r103270 >
Date:00:01, 16 November 2011
Author:tparscal
Status:ok
Tags:
Comment:
Changed nodes to selectedNodes for clarity
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
@@ -189,13 +189,13 @@
190190 * @param {es.Range} range Range of content to draw selection around
191191 */
192192 es.DocumentViewBranchNode.prototype.drawSelection = function( range ) {
193 - var nodes = this.selectNodes( range, true );
 193+ var selectedNodes = this.selectNodes( range, true );
194194 for ( var i = 0; i < this.children.length; i++ ) {
195 - if ( nodes.length && this.children[i] === nodes[0].node ) {
196 - for ( var j = 0; j < nodes.length; j++ ) {
197 - nodes[j].node.drawSelection( nodes[j].range );
 195+ if ( selectedNodes.length && this.children[i] === selectedNodes[0].node ) {
 196+ for ( var j = 0; j < selectedNodes.length; j++ ) {
 197+ selectedNodes[j].node.drawSelection( selectedNodes[j].range );
198198 }
199 - i += nodes.length - 1;
 199+ i += selectedNodes.length - 1;
200200 } else {
201201 this.children[i].clearSelection();
202202 }

Status & tagging log