r103363 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103362‎ | r103363 | r103364 >
Date:19:51, 16 November 2011
Author:inez
Status:deferred
Tags:
Comment:
Support for moving cursor up and down by "unit" distance when control key pressed down.
Modified paths:
  • /trunk/extensions/VisualEditor/modules/es/views/es.SurfaceView.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/es/views/es.SurfaceView.js
@@ -408,6 +408,21 @@
409409 case 'down':
410410 switch ( unit ) {
411411 case 'unit':
 412+ var toNode = null;
 413+ this.documentView.model.traverseLeafNodes(
 414+ function( node ) {
 415+ if ( toNode === null) {
 416+ toNode = node;
 417+ } else {
 418+ toNode = node;
 419+ return false;
 420+ }
 421+ },
 422+ this.documentView.getNodeFromOffset( this.selection.to, false ).getModel(),
 423+ direction === 'up' ? true : false
 424+ );
 425+ to = this.documentView.model.getOffsetFromNode( toNode, false ) + 1;
 426+ break;
412427 case 'char':
413428 /*
414429 * Looks for the in-document character position that would match up with the

Status & tagging log