new RowSelection()
Members
currentDrag :Point
The pixel location of the mouse pointer during a drag operation.
Type:
- Default Value:
- null
lastDragCell :Object
The cell coordinates of the where the mouse pointer is during a drag operation.
Type:
- Object
- Default Value:
- null
sbAutoStart :number
a millisecond value representing the time the current autoscroll started
Type:
- number
- Default Value:
- 0
sbLastAuto :number
a millisecond value representing the previous time an autoscroll started
Type:
- number
- Default Value:
- 0
Methods
checkDragScroll(grid, mouse)
this checks while were dragging if we go outside the visible bounds, if so, kick off the external autoscroll check function (above)
Parameters:
Name | Type | Description |
---|---|---|
grid |
Hypergrid | |
mouse |
Object | the event details |
extendSelection(grid, gridCell, keys)
extend a selection or create one if there isnt yet
Parameters:
Name | Type | Description |
---|---|---|
grid |
Hypergrid | |
gridCell |
Object | the event details |
keys |
Array | array of the keys that are currently pressed down |
getAutoScrollAcceleration()
If we are holding down the same navigation key, accelerate the increment we scroll
returns: integer
getAutoScrollDuration()
answer how long we have been auto scrolling
returns: integer
handleDOWN(grid, event)
Parameters:
Name | Type | Description |
---|---|---|
grid |
Hypergrid | |
event |
Object | the event details |
handleDOWNSHIFT(grid)
Parameters:
Name | Type | Description |
---|---|---|
grid |
Hypergrid |
handleKeyDown(grid, event)
Parameters:
Name | Type | Description |
---|---|---|
grid |
Hypergrid | |
event |
Object | the event details |
handleLEFT(grid, event)
Parameters:
Name | Type | Description |
---|---|---|
grid |
Hypergrid | |
event |
Object | the event details |
handleLEFTSHIFT(grid, event)
Parameters:
Name | Type | Description |
---|---|---|
grid |
Hypergrid | |
event |
Object | the event details |
handleMouseDown(grid, event)
Parameters:
Name | Type | Description |
---|---|---|
grid |
Hypergrid | |
event |
Object | the event details |
handleMouseDrag(grid, event)
Parameters:
Name | Type | Description |
---|---|---|
grid |
Hypergrid | |
event |
Object | the event details |
handleMouseDragCellSelection(grid, mouse, keys)
Handle a mousedrag selection
Parameters:
Name | Type | Description |
---|---|---|
grid |
Hypergrid | |
mouse |
Object | the event details |
keys |
Array | array of the keys that are currently pressed down |
handleMouseUp(grid, event)
Parameters:
Name | Type | Description |
---|---|---|
grid |
Hypergrid | |
event |
Object | the event details |
handleRIGHT(grid, event)
Parameters:
Name | Type | Description |
---|---|---|
grid |
Hypergrid | |
event |
Object | the event details |
handleRIGHTSHIFT(grid, event)
Parameters:
Name | Type | Description |
---|---|---|
grid |
Hypergrid | |
event |
Object | the event details |
handleUP(grid, event)
Parameters:
Name | Type | Description |
---|---|---|
grid |
Hypergrid | |
event |
Object | the event details |
handleUPSHIFT(grid, event)
Parameters:
Name | Type | Description |
---|---|---|
grid |
Hypergrid | |
event |
Object | the event details |
moveShiftSelect(grid, offsetX, offsetY)
Augment the most recent selection extent by (offsetX,offsetY) and scroll if necessary.
Parameters:
Name | Type | Description |
---|---|---|
grid |
Hypergrid | |
offsetX |
number | x coordinate to start at |
offsetY |
number | y coordinate to start at |
moveSingleSelect(grid, offsetY)
Replace the most recent row selection with a single cell row selection offsetY
rows from the previous selection.
Parameters:
Name | Type | Description |
---|---|---|
grid |
Hypergrid | |
offsetY |
number | y coordinate to start at |
pingAutoScroll()
update the autoscroll start time if we haven't autoscrolled within the last 500ms otherwise update the current autoscroll time
scrollDrag(grid)
this function makes sure that while we are dragging outside of the grid visible bounds, we srcroll accordingly
Parameters:
Name | Type | Description |
---|---|---|
grid |
Hypergrid |
setAutoScrollStartTime()
set the start time to right now when we initiate an auto scroll