Class: NoteGroup

NoteGroup(noteArray, noteScale, label, options, properties, active, firstCreated)

A note group annotation.

Constructor

new NoteGroup(noteArray, noteScale, label, options, properties, active, firstCreated)

Create a marker annotation.
Parameters:
Name Type Description
noteArray Array An array of notes.
noteScale Array The value scale for the notes.
label string A label.
options Object Configuration options.
properties Object Properties.
active boolean Whether this boundary should be active when created.
firstCreated boolean Whether this boundary has just been created.
Author:
  • Lawrence Fyfe
Source:

Methods

addNote(note)

Add the specified note to this group.
Parameters:
Name Type Description
note Object The note.
Source:

addNoteArray(noteArray)

Add the specified array of notes to this group.
Parameters:
Name Type Description
noteArray Array An array of notes.
Source:

containsNote(note) → {boolean}

Determine whether this group contains the specified note.
Parameters:
Name Type Description
note Object A note.
Source:
Returns:
True if this group contains the note; false otherwise.
Type
boolean

deleteNoteArray(noteArray)

Delete the specified array of notes from this group.
Parameters:
Name Type Description
noteArray Array An array of notes.
Source:

draw(parentElement, timeScale, noteHeight)

Draw this note group with the specified parameters from the containing pane and the specified note height.
Parameters:
Name Type Description
parentElement d3.selection The parent element.
timeScale d3.scaleLinear The time scale.
noteHeight number The height of notes in pixels.
Source:

drawSelections(parentElement, timeScale, noteHeight, active)

Draw note selections in this note group with the specified parameters.
Parameters:
Name Type Description
parentElement d3.selection The parent element.
timeScale d3.scaleLinear The time scale.
noteHeight number The height of notes in pixels.
active boolean If true, note selections are active.
Source:

erase()

Erase this note group.
Source:

eraseSelections()

Erase the note in this note group.
Source:

select(select)

Select or deselect this note group.
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: