Class: CellSelection

CellSelection

new CellSelection()

Extends

Members

currentDrag :Point

The pixel location of the mouse pointer during a drag operation.

Type:

currentHoverCell :Point

the cell location where the cursor is currently

Type:
Inherited From:
Default Value:
  • null

cursor :string

the cursor I want to be displayed

Type:
  • string
Inherited From:
Default Value:
  • null

detached :Feature

a temporary holding field for my next feature when I'm in a disconnected state

Type:
Inherited From:
Default Value:
  • null

lastDragCell :Object

the cell coordinates of the where the mouse pointer is during a drag operation

Type:
  • Object

next :Feature

the next feature to be given a chance to handle incoming events

Type:
Inherited From:
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

attachChain()

reattach my child from the detached reference

Inherited From:

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

detachChain()

disconnect my child

Inherited From:

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

Overrides:
  • Feature#handleKeyDown

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

Overrides:
  • Feature#handleMouseDown

handleMouseDrag(grid, event)

Parameters:
Name Type Description
grid Hypergrid
event Object

the event details

Overrides:
  • Feature#handleMouseDrag

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

Overrides:
  • Feature#handleMouseUp

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

isFirstFixedColumn(grid, event)

Parameters:
Name Type Description
grid Hypergrid
event Object

the event details

Inherited From:

isFirstFixedRow(grid, event)

Parameters:
Name Type Description
grid Hypergrid
event Object

the event details

Inherited From:

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

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