Home Reference Source
public class | source

SelectBox

Extends:

react~React.Component → SelectBox

Component to show a selection box (like on windows desktop)

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public
public
public

Method Summary

Public Methods
public

end(): Object

Generally on mouse up.

public

move(x: number, y: number)

Update the selection box as the mouse moves

public

start(x: number, y: number)

Create the selection box

Public Constructors

public constructor() source

Public Members

public curX: number source

public curY: number source

public startX: number source

public startY: number source

Public Methods

public end(): Object source

Generally on mouse up. Finish the selection box and return the rectangle created

Return:

Object

The selection rectangle

Return Properties:

NameTypeAttributeDescription
top number

The top y coordinate

left number

The left x coordinate

width number

The width of the box

height number

The height of the box

public move(x: number, y: number) source

Update the selection box as the mouse moves

Params:

NameTypeAttributeDescription
x number

The current X coordinate of the mouse

y number

The current Y coordinate of the mouse

public start(x: number, y: number) source

Create the selection box

Params:

NameTypeAttributeDescription
x number

Starting x coordinate for selection box

y number

Starting y coordinate for selection box