new Ab.timeline.TimelineController(id, isEditable, policy)
new Ab.timeline.TimelineController(id, isEditable, policy)
Create a new Controller object.
Parameters:
-
id
(String): the id attribute of the HTML element that contains the timeline control; -
isEditable
(boolean): whether the user can change the timeline content using drag-and-drop; -
policy
(object): (optional) object that implements the drag-and-drop policy. If not specified, the Ab.timeline.DefaultPolicy object is used.
Note:
Implementing
custom drag-and-drop policy is an advanced software engineering task.
Example:
Create a new timeline control in read-only mode:
var timeline =
new Ab.timeline.TimelineController(
'div_timeline', false);