Timeline
Extends:
Timeline class
Static Member Summary
Static Public Members | ||
public static |
|
|
public static |
changeTypes: * The types of interactions - see onInteraction |
|
public static |
defaultProps: * |
|
public static |
no_op: * Alias for no op function |
|
public static |
propTypes: * |
Static Method Summary
Static Public Methods | ||
public static |
Checks if the given bit is set in the given mask |
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public |
itemRowMap: {} |
|
public |
|
|
public |
refreshGrid(config: Object): * re-computes the grid's row sizes |
|
public |
|
|
public |
rowHeightCache: {} |
|
public |
rowItemMap: {} |
|
public |
|
|
public |
state: {"selection": *, "cursorTime": *} |
Private Members | ||
private |
_grid: * |
|
private |
_gridDomNode: * |
|
private |
|
|
private |
|
|
private |
_selectBox: * |
|
private |
|
Method Summary
Public Methods | ||
public |
cellRenderer(width: number): * |
|
public |
changeGroup(item: object, curRow: number, newRow: number) Move an item from one row to another |
|
public |
Clears the currently selected time range state |
|
public |
|
|
public |
componentDidUpdate(prevProps: *, prevState: *) |
|
public |
componentWillReceiveProps(nextProps: *) |
|
public |
|
|
public |
getCursor(): * |
|
public |
Gets an item given its ID |
|
public |
getTimelineWidth(totalWidth: number): number Get the width of the timeline NOT including the left group list |
|
public |
grid_ref_callback(reactComponent: Object) Set the grid ref. |
|
public |
itemFromElement(e: Object): Object Returns an item given its DOM element |
|
public |
mouseMoveFunc(e: *) |
|
public |
render(): * |
|
public |
rowHeight(objectPattern: {"index": *}): * Helper for react virtuaized to get the row height given a row index |
|
public |
select_ref_callback(reactComponent: Object) Set the select box ref. |
|
public |
setSelection(selections: Object[]) Set the currently selected time ranges (for the timebar to display) |
|
public |
setTimeMap(items: Object[], startDate: moment, endDate: moment) Sets the internal maps used by the component for looking up item & row data |
|
public |
setUpDragging(canSelect: *, canDrag: *, canResize: *) |
|
public |
throttledMouseMoveFunc(e: *) Event handler for onMouseMove. |
|
public |
Re-renders the grid when the window or container is resized |
Static Public Methods
Public Constructors
public constructor() source
Public Members
public itemRowMap: {} source
public mouse_snapped_time: * source
public resizeTimeout: * source
public rowHeightCache: {} source
public rowItemMap: {} source
public state: {"selection": *, "cursorTime": *} source
Private Members
private _grid: * source
private _gridDomNode: * source
private _handleItemRowEvent: * source
private _itemInteractable: * source
private _selectBox: * source
private _selectRectangleInteractable: * source
Public Methods
public cellRenderer(width: number): * source
Params:
Name | Type | Attribute | Description |
width | number | container width (in px) |
Return:
* |
public changeGroup(item: object, curRow: number, newRow: number) source
Move an item from one row to another
public componentDidMount() source
public componentDidUpdate(prevProps: *, prevState: *) source
Params:
Name | Type | Attribute | Description |
prevProps | * | ||
prevState | * |
public componentWillReceiveProps(nextProps: *) source
Params:
Name | Type | Attribute | Description |
nextProps | * |
public componentWillUnmount() source
public getItem(id: number): Object source
Gets an item given its ID
Params:
Name | Type | Attribute | Description |
id | number | item id |
public getTimelineWidth(totalWidth: number): number source
Get the width of the timeline NOT including the left group list
Params:
Name | Type | Attribute | Description |
totalWidth | number |
|
Total timeline width. If not supplied we use the timeline ref |
public grid_ref_callback(reactComponent: Object) source
Set the grid ref.
Params:
Name | Type | Attribute | Description |
reactComponent | Object | Grid react element |
public itemFromElement(e: Object): Object source
Returns an item given its DOM element
Params:
Name | Type | Attribute | Description |
e | Object | the DOM element of the item |
public mouseMoveFunc(e: *) source
Params:
Name | Type | Attribute | Description |
e | * |
public rowHeight(objectPattern: {"index": *}): * source
Helper for react virtuaized to get the row height given a row index
Params:
Name | Type | Attribute | Description |
objectPattern | {"index": *} |
|
Return:
* |
public select_ref_callback(reactComponent: Object) source
Set the select box ref.
Params:
Name | Type | Attribute | Description |
reactComponent | Object | Selectbox react element |
public setSelection(selections: Object[]) source
Set the currently selected time ranges (for the timebar to display)
Params:
Name | Type | Attribute | Description |
selections | Object[] | Of the form |
public setTimeMap(items: Object[], startDate: moment, endDate: moment) source
Sets the internal maps used by the component for looking up item & row data
public setUpDragging(canSelect: *, canDrag: *, canResize: *) source
Params:
Name | Type | Attribute | Description |
canSelect | * | ||
canDrag | * | ||
canResize | * |
public throttledMouseMoveFunc(e: *) source
Event handler for onMouseMove. Only calls back if a new snap time is reached
Params:
Name | Type | Attribute | Description |
e | * |