Timebar
Extends:
Timebar component - displays the current time on top of the timeline
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public |
state: {} |
Method Summary
Public Methods | ||
public |
|
|
public |
componentWillReceiveProps(nextProps: Object) On new props we check if a resolution is given, and if not we guess one |
|
public |
getPixelIncrement(date: moment, resolutionType: string): number Gets the number of pixels per segment of the timebar section (using the resolution) |
|
public |
guessResolution(start: moment, end: moment) Attempts to guess the resolution of the top and bottom halves of the timebar based on the viewable date range. |
|
public |
Renders the timebar |
|
public |
Renders an entire segment of the timebar (top or bottom) |
|
public |
Renderer for bottom bar. |
|
public |
Renderer for top bar. |
Public Constructors
public constructor() source
Public Members
public state: {} source
Public Methods
public componentWillMount() source
public componentWillReceiveProps(nextProps: Object) source
On new props we check if a resolution is given, and if not we guess one
Params:
Name | Type | Attribute | Description |
nextProps | Object | Props coming in |
public getPixelIncrement(date: moment, resolutionType: string): number source
Gets the number of pixels per segment of the timebar section (using the resolution)
public guessResolution(start: moment, end: moment) source
Attempts to guess the resolution of the top and bottom halves of the timebar based on the viewable date range. Sets resolution to state.
public renderBar(resolution: string): Object[] source
Renders an entire segment of the timebar (top or bottom)
Params:
Name | Type | Attribute | Description |
resolution | string | The resolution to render at [Year; Month...] |
Return:
Object[] | A list of sections (making up a segment) to be rendered |