mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-01 01:16:30 +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.$ );
|
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,
|
||||||
|
|
Loading…
Reference in a new issue