Class links.Timeline.Item
Defined in: timeline.js.
Constructor Attributes | Constructor Name and Description |
---|---|
links.Timeline.Item(data, options)
|
Method Attributes | Method Name and Description |
---|---|
Creates the DOM for the item, depending on its type
|
|
getImageUrls(imageUrls)
Append all image urls present in the items DOM to the provided array
|
|
getLeft(timeline)
Calculate the left position of the item
|
|
getRight(timeline)
Calculate the right position of the item
|
|
getWidth(timeline)
Calculate the width of the item
|
|
hideDOM(container)
Remove the items DOM from the current HTML container
|
|
Check if the item is drawn in the timeline (i.e.
|
|
isVisible(start, end)
Check if the item is located in the visible area of the timeline, and
not part of a cluster
|
|
reflow()
Reflow the Item: retrieve its actual size from the DOM
|
|
select()
Select the item
|
|
setPosition(left, right)
Reposition the item
|
|
showDOM(container)
Append the items DOM to the given HTML container.
|
|
unselect()
Unselect the item
|
|
Update the DOM of the item.
|
|
updatePosition(timeline)
Reposition the item, recalculate its left, top, and width, using the current
range of the timeline and the timeline options.
|
Class Detail
links.Timeline.Item(data, options)
- Parameters:
- {Object} data
- Object containing parameters start, end content, group, type, editable.
- {Object} options Optional
- Options to set initial property values {Number} top {Number} left {Number} width {Number} height
Method Detail
{Element | undefined}
createDOM()
Creates the DOM for the item, depending on its type
- Returns:
- {Element | undefined}
getImageUrls(imageUrls)
Append all image urls present in the items DOM to the provided array
- Parameters:
- {String[]} imageUrls
{Number}
getLeft(timeline)
Calculate the left position of the item
- Parameters:
- {links.Timeline} timeline
- Returns:
- {Number} left
{Number}
getRight(timeline)
Calculate the right position of the item
- Parameters:
- {links.Timeline} timeline
- Returns:
- {Number} right
{Number}
getWidth(timeline)
Calculate the width of the item
- Parameters:
- {links.Timeline} timeline
- Returns:
- {Number} width
hideDOM(container)
Remove the items DOM from the current HTML container
- Parameters:
- {Element} container
{boolean}
isRendered()
Check if the item is drawn in the timeline (i.e. the DOM of the item is
attached to the frame. You may also just request the parameter item.rendered
- Returns:
- {boolean} rendered
{boolean}
isVisible(start, end)
Check if the item is located in the visible area of the timeline, and
not part of a cluster
- Parameters:
- {Date} start
- {Date} end
- Returns:
- {boolean} visible
{boolean}
reflow()
Reflow the Item: retrieve its actual size from the DOM
- Returns:
- {boolean} resized returns true if the axis is resized
select()
Select the item
setPosition(left, right)
Reposition the item
- Parameters:
- {Number} left
- {Number} right
showDOM(container)
Append the items DOM to the given HTML container. If items DOM does not yet
exist, it will be created first.
- Parameters:
- {Element} container
unselect()
Unselect the item
updateDOM()
Update the DOM of the item. This will update the content and the classes
of the item
updatePosition(timeline)
Reposition the item, recalculate its left, top, and width, using the current
range of the timeline and the timeline options.
- Parameters:
- {links.Timeline} timeline