Class links.Timeline
Timeline
The timeline is a visualization chart to visualize events in time.
The timeline is developed in javascript as a Google Visualization Chart.
Defined in: timeline.js.
Constructor Attributes | Constructor Name and Description |
---|---|
links.Timeline(container)
|
Method Attributes | Method Name and Description |
---|---|
<static> |
links.Timeline.addEventListener(element, action, listener, useCapture)
Add and event listener.
|
addGroup(groupName)
Add a group.
|
|
addItem(itemData)
Add a new item.
|
|
addItems(items)
Add new items.
|
|
Cancel creation of a new item
This method can be called insed an event listener which catches the "new"
event.
|
|
Cancel a change item
This method can be called insed an event listener which catches the "change"
event.
|
|
Cancel deletion of an item
This method can be called insed an event listener which catches the "delete"
event.
|
|
changeItem(index, itemData)
Edit an item
|
|
Check if the timeline is resized, and if so, redraw the timeline.
|
|
collision(item1, item2, margin)
Test if the two provided items collide
The items must have parameters left, right, top, and bottom.
|
|
confirmDeleteItem(index)
Delete an item after a confirmation.
|
|
createEventBox(content)
Create an event in the timeline, with (optional) formatting: inside a box
with rounded corners, and a vertical line+dot to the axis.
|
|
createEventDot(content)
Create an event in the timeline: a dot, followed by the content.
|
|
createEventRange(content)
Create an event range as a beam in the timeline.
|
|
createItem(itemData)
Create an item object, containing all needed parameters
|
|
Delete all items
|
|
Delete all groups
|
|
deleteItem(index)
Delete an item
|
|
draw(data, options)
Main drawing logic.
|
|
findGroup(group)
Find a group by its name.
|
|
<static> |
links.Timeline.getAbsoluteLeft(elem)
Retrieve the absolute left value of a DOM element
|
<static> |
links.Timeline.getAbsoluteTop(elem)
Retrieve the absolute top value of a DOM element
|
Get current time.
|
|
Retrieve the current custom time.
|
|
getData(data)
Return the original data table.
|
|
getGroupFromHeight(height)
Find the group from a given height in the timeline
|
|
getItem(index)
Retrieve the properties of an item.
|
|
getItemIndex(element)
Find the item index from a given HTML element
If no item index is found, undefined is returned
|
|
Retrieve the currently selected event
|
|
<static> |
links.Timeline.getTarget(event)
Get HTML element which is the target of the event
|
Retrieve the current visible range in the timeline.
|
|
isSelected(index)
Check if an item is currently selected
|
|
move(moveFactor)
Move the timeline the given movefactor to the left or right.
|
|
onDblClick(event)
Double click event occurred for an item
|
|
onMouseDown(event)
Start a moving operation inside the provided parent element
|
|
onMouseMove(event)
Perform moving operating.
|
|
onMouseUp(event)
Stop moving operating.
|
|
onMouseWheel(event)
Event handler for mouse wheel event, used to zoom the timeline
Code from http://adomas.org/javascript-mouse-wheel/
|
|
onTouchEnd(event)
Event handler for touchend event on mobile devices
|
|
onTouchMove(event)
Event handler for touchmove event on mobile devices
|
|
onTouchStart(event)
Event handler for touchstart event on mobile devices
|
|
<static> |