Class: Comment

Comment(time, label, options, properties, active, firstCreated)

A comment annotation.

Constructor

new Comment(time, label, options, properties, active, firstCreated)

Create a comment annotation.
Parameters:
Name Type Description
time number The time.
label string A label.
options Object Configuration options.
properties Object Properties.
active boolean Whether this comment should be active when created.
firstCreated boolean Whether this comment has just been created.
Author:
  • Lawrence Fyfe
Source:

Methods

draw(parentElement, parentWidth, parentHeight, timeScale)

Draw this comment with the specified parameters from the containing pane.
Parameters:
Name Type Description
parentElement d3.selection The parent element.
parentWidth number The width.
parentHeight number The height.
timeScale d3.scaleLinear The time scale.
Source:

drawLabel(parentElement, parentWidth, parentHeight, x)

Draw the label.
Parameters:
Name Type Description
parentElement d3.selection The parent element.
parentWidth number The width.
parentHeight number The height.
x number The x location.
Source:

erase()

Erase this comment.
Source:

eraseLabel()

Erase the label.
Source:

getTime() → {number}

Get the time.
Source:
Returns:
The time.
Type
number

select(select)

Select or deselect this comment.
Parameters:
Name Type Description
select boolean If true, select; otherwise deselect.
Source:

setLabel(label)

Set the label string.
Parameters:
Name Type Description
label string The label.
Source: