Class: NotationView

MusicXMLAnalyzer. NotationView

new NotationView()

Source:

Methods

<inner> addClef(mode)

Method adds a clef according to mode
Parameters:
Name Type Description
mode int current selected mode
Source:

<inner> checkHorizontalArea(y) → {string}

Method checks on which horitiontal position the mousecursor is and saves the corresponding note
Parameters:
Name Type Description
y int horizontal position of cursor
Source:
Returns:
hoverdnote hovered note according to calculated cursor position
Type
string

<inner> clearCanvas()

Method to clear canvas and redraw staves
Source:

<inner> init()

Init function
Source:

<inner> initCanvas()

This method inits canvas and context and sets canvas top and left to variable
Source:

<inner> onChangeMode(event, mode)

Method clears canvas, creates new stave and adds a new clef on mode change
Parameters:
Name Type Description
event event the triggered event
mode int the selected mode
Source:

<inner> onMouseClickCanvas()

Method handels mouseclick event on canvas
Source:

<inner> onMouseMoveCanvas(The)

Method handels the mouseover event on canvas
Parameters:
Name Type Description
The Event triggered event
Source:

<inner> registerListener()

Method registers listener to canvas
Source:

<inner> renderNotes(vexflowNotes)

Method displays note elements on the canvas and get them from model
Parameters:
Name Type Description
vexflowNotes object contains notes for vexflow
Source:

<inner> renderVexFlowNotePreview()

Method renders preview note on canvas at mouseover
Source:

<inner> setTopNoteValues()

Method calculates the position of the notes
Source: