API Docs for: 1.4.4
Show:

ukeGeeks.chordBrush Class

First places a Canvas element within a DOM element, then draws a chord diagram on it.

Methods

_drawFretboard

(
  • ctx
  • pos
  • fretBox
)
Void private

Parameters:

  • ctx CanvasContext

    Valid Canvas Context Handle

  • pos XYPosObject

    Object with two properties: x & y ints, position in pixels

  • fretBox Settings

Returns:

Void:

_drawX

(
  • ctx
  • centerPos
  • fretBox
  • strokeColor
)
Void private

Plots an "X" centered at POSITION

Parameters:

  • ctx CanvasContext

    Valid Canvas Context handle

  • centerPos XyPositionJson

    JSON with two properties: x & y ints, position in pixels, format {x: , y: }

  • fretBox JSON

    See Settings.fretBox

  • strokeColor String

    Valid CSS hex color (shorthand not recommended)

Returns:

Void:

_getFretRange

(
  • dots
)
JSON private

Returns first & last frets, 0 if none found.

Parameters:

  • dots array

    Array of ukeGeeks.data.dot objects

Returns:

JSON:

_mutedStrings

(
  • ctx
  • fretBox
  • muted
  • strokeColor
)
Void private

TODO: Loop over the muted array, dropping X's whenever a string position is TRUE

Parameters:

  • ctx CanvasContext

    Valid Canvas Context handle

  • fretBox JSON

    See Settings.fretBox

  • muted Bool

    Is this string "muted"?

  • strokeColor String

    Valid CSS hex color (shorthand not recommended)

Returns:

Void:

init

() Void

Again this is a constructor replacement

Returns:

Void:

plot

(
  • chordBox
  • chord
  • fretBox
  • fontSettings
  • colorSettings
)
Void

Puts a new Canvas within ChordBox and draws the chord diagram on it.

Parameters:

  • chordBox DOMElement

    Handle to the DOM element where the chord is to be drawn.

  • chord ExpandedChord

    Chord Diagram to be drawn.

  • fretBox JSON

    Appropriate ukeGeeks.settings.fretBox -- either "fretBox" or "inlineFretBox"

  • fontSettings JSON

    (optional) Defaults to settings.fonts

  • colorSettings JSON

    (optional) Defaults to settings.colors

Returns:

Void:

Properties

_public

Object

attach public members to this object