From d37a325f44c06bd02f9915b952f4292b994c3819 Mon Sep 17 00:00:00 2001 From: Rob Moen Date: Thu, 12 Apr 2012 16:37:23 -0700 Subject: [PATCH] Cleanup terms used in annotation method Change-Id: I509a1f1b680cc8a2973188f0ed7c7d67b8a15f4f --- modules/ve/ce/ve.ce.Surface.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/ve/ce/ve.ce.Surface.js b/modules/ve/ce/ve.ce.Surface.js index c880cea5aa..45ff5a072f 100644 --- a/modules/ve/ce/ve.ce.Surface.js +++ b/modules/ve/ce/ve.ce.Surface.js @@ -307,7 +307,7 @@ ve.ce.Surface.prototype.pollChanges = function( async ) { }; ve.ce.Surface.prototype.annotate = function( method, annotation ) { - var range = this.model.getSelection(), + var selection = this.model.getSelection(), _this = this; if ( method === 'toggle' ) { @@ -318,9 +318,9 @@ ve.ce.Surface.prototype.annotate = function( method, annotation ) { method = 'set'; } } - if ( range.getLength() ) { + if ( selection.getLength() ) { var tx = this.model.getDocument().prepareContentAnnotation( - range, method, annotation + selection, method, annotation ); // transact with autoRender @@ -330,7 +330,7 @@ ve.ce.Surface.prototype.annotate = function( method, annotation ) { this.clearPollData(); - _this.showSelection( range ); + _this.showSelection( selection ); } else { if ( method === 'set' ) { this.addInsertionAnnotation( annotation );