From 1359c19cbb9208890718328050d83aa113352198 Mon Sep 17 00:00:00 2001 From: Inez Korczynski Date: Mon, 14 Nov 2011 19:51:04 +0000 Subject: [PATCH] Add comments for mouse interaction states --- modules/es/views/es.SurfaceView.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/es/views/es.SurfaceView.js b/modules/es/views/es.SurfaceView.js index 675c68bf46..5d8b615a61 100644 --- a/modules/es/views/es.SurfaceView.js +++ b/modules/es/views/es.SurfaceView.js @@ -40,10 +40,19 @@ es.SurfaceView = function( $container, model ) { this.$.append( this.documentView.$ ); // Interaction state + + // There are three different selection modes available for mouse. Selection of: + // * 1 - chars + // * 2 - words + // * 3 - nodes (e.g. paragraph, listitem) + // + // In case of 2 and 3 selectedRange stores the range of original selection caused by double + // or triple mousedowns. this.mouse = { selectingMode: null, selectedRange: null }; + this.cursor = { $: $( '
' ).appendTo( this.$ ), interval: null,