Add comments for mouse interaction states

This commit is contained in:
Inez Korczynski 2011-11-14 19:51:04 +00:00
parent 773d97cb1d
commit 1359c19cbb

View file

@ -40,10 +40,19 @@ es.SurfaceView = function( $container, model ) {
this.$.append( this.documentView.$ ); this.$.append( this.documentView.$ );
// Interaction state // 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 = { this.mouse = {
selectingMode: null, selectingMode: null,
selectedRange: null selectedRange: null
}; };
this.cursor = { this.cursor = {
$: $( '<div class="es-surfaceView-cursor"></div>' ).appendTo( this.$ ), $: $( '<div class="es-surfaceView-cursor"></div>' ).appendTo( this.$ ),
interval: null, interval: null,