mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-30 17:14:42 +00:00
Add comments for mouse interaction states
This commit is contained in:
parent
773d97cb1d
commit
1359c19cbb
|
@ -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 = {
|
||||
$: $( '<div class="es-surfaceView-cursor"></div>' ).appendTo( this.$ ),
|
||||
interval: null,
|
||||
|
|
Loading…
Reference in a new issue