Skip to content

Latest commit

 

History

History
639 lines (422 loc) · 18 KB

api-docs.md

File metadata and controls

639 lines (422 loc) · 18 KB

API Documentation

Lorem ipsum...some description, if necessary, for the API usage section.

Table of Contents


guitar-diagrams.mjs Class

guitar-diagrams.mjs Constructors (non-default)

Constructor(s) in guitar-diagrams.mjs go here... or None.

guitar-diagrams.mjs Static Public Members

Static members in guitar-diagrams.mjs go here... (We might need to talk about how to handled these.)

guitar-diagrams.mjs Public Properties

Properties in guitar-diagrams.mjs go here...

guitar-diagrams.mjs Public Methods

Methods in guitar-diagrams.mjs go here...

guitar-diagrams-config.mjs Class

guitar-diagrams-config.mjs Constructors (non-default)

Constructor(s) in guitar-diagrams-config.mjs go here...

guitar-diagrams-config.mjs Public Properties

Properties in guitar-diagrams-config.mjs go here...

canvasID (get)

Exists as a property of the config property on the GuitarDiagrams object. Sets the ID attribute of the canvas HTML element.

  • Parameters: None
  • Return Value: {string} The ID attribute of the canvas HTML element.
  • Default Value: {string} 'gdjCanvas'

Example:

console.log('Canvas ID: ' + gdj1.config.canvasID);

canvasID (set)

Exists as a property of the config property on the GuitarDiagrams object. Sets the ID attribute of the canvas HTML element.

  • Parameters: {string} The ID attribute of the canvas HTML element.
  • Return Value: None
  • Default Value: {string} 'gdjCanvas'

Example:

gdj1.config.canvasID = 'diagram-1-canvas';

colorFretboard (get)

Exists as a property of the config property on the GuitarDiagrams object. Gets the HTML color code of the fretboard.

  • Parameters: None
  • Return Value: {string} The HTML color code of the fretboard.
  • Default Value: {string} '#795548'

Example:

console.log('Fretboard color: ' + gdj5.config.colorFretboard);

colorFretboard (set)

Exists as a property of the config property on the GuitarDiagrams object. Sets the HTML color code of the fretboard.

  • Parameters: {string} The HTML color code of the fretboard.
  • Return Value: None
  • Default Value: {string} '#795548'

Example:

gdj1.config.colorFretboard = '#FFE0B2';

colorNut (get)

Exists as a property of the config property on the GuitarDiagrams object. Gets the HTML color code of the nut.

  • Parameters: None
  • Return Value: {string} The HTML color code of the nut.
  • Default Value: {string} '#F2F3F4'

Example:

console.log(gdj1.config.colorNut);

colorNut (set)

Exists as a property of the config property on the GuitarDiagrams object. Sets the HTML color code of the nut.

  • Parameters: {string} The HTML color code of the nut.
  • Return Value: None
  • Default Value: {string} '#F2F3F4'

Example:

gdj1.config.colorNut = '#FFFFFF';

colorNutOutline (get)

Exists as a property of the config property on the GuitarDiagrams object. Gets the HTML color code of the nut outline.

  • Parameters: None
  • Return Value: {string} The HTML color code of the nut outline.
  • Default Value: {string} '#000000'

Example:

console.log(gdj1.config.colorNutOutline);

colorNutOutline (set)

Exists as a property of the config property on the GuitarDiagrams object. Sets the HTML color code of the nut outline.

  • Parameters: {string} The HTML color code of the nut outline.
  • Return Value: None
  • Default Value: {string} '#000000'

Example:

gdj1.config.colorNutOutline = '#7E5109';

colorFrets (get)

Exists as a property of the config property on the GuitarDiagrams object. Gets the HTML color code of the frets.

  • Parameters: None
  • Return Value: {string} The HTML color code of the frets.
  • Default Value: {string} '#808B96'

Example:

console.log(gdj1.config.colorFrets);

colorFrets (set)

Exists as a property of the config property on the GuitarDiagrams object. Sets the HTML color code of the frets.

  • Parameters: {string} The HTML color code of the nut outline.
  • Return Value: None
  • Default Value: {string} '#808B96'

Example:

gdj1.config.colorFrets = '#AEB6BF';

colorStrings (get)

Exists as a property of the config property on the GuitarDiagrams object. Gets the HTML color code of the strings.

  • Parameters: None
  • Return Value: {string} The HTML color code of the strings.
  • Default Value: {string} '#CFD8DC'

Example:

console.log(gdj1.config.colorStrings);

colorStrings (set)

Exists as a property of the config property on the GuitarDiagrams object. Sets the HTML color code of the strings.

  • Parameters: {string} The HTML color code of the strings.
  • Return Value: None
  • Default Value: {string} '#CFD8DC'

Example:

gdj1.config.colorStrings = '#566573';

colorFretMarker (get)

Exists as a property of the config property on the GuitarDiagrams object. Gets the HTML color code of the fret markers.

  • Parameters: None
  • Return Value: {string} The HTML color code of the fret markers.
  • Default Value: {string} '#FFFFFF'

Example:

console.log(gdj1.config.colorFretMarker);

colorFretMarker (set)

Exists as a property of the config property on the GuitarDiagrams object. Sets the HTML color code of the fret markers.

  • Parameters: {string} The HTML color code of the fret markers.
  • Return Value: None
  • Default Value: {string} '#FFFFFF'

Example:

gdj1.config.colorFretMarker = '#424949';

colorDiagramBackground (get)

Exists as a property of the config property on the GuitarDiagrams object. Gets the HTML color code of the diagram background.

  • Parameters: None
  • Return Value: {string} The HTML color code of the diagram background.
  • Default Value: {string} null

Example:

console.log(gdj1.config.colorDiagramBackground);

colorDiagramBackground (set)

Exists as a property of the config property on the GuitarDiagrams object. Sets the HTML color code of the diagram background.

  • Parameters: {string} The HTML color code of the diagram background.
  • Return Value: None
  • Default Value: {string} null

Example:

gdj1.config.colorDiagramBackground = '#000000';

colorLabel (get)

Exists as a property of the config property on the GuitarDiagrams object. Gets HTML color code of the label text for string names and fret number.

  • Parameters: None
  • Return Value: {string} The HTML color code of the label text for string names and fret number.
  • Default Value: {string} '#000000'

Example:

console.log(gdj1.config.colorLabel);

colorLabel (set)

Exists as a property of the config property on the GuitarDiagrams object. Sets HTML color code of the label text for string names and fret number.

  • Parameters: {string} The HTML color code of the label text for string names and fret number.
  • Return Value: None
  • Default Value: {string} '#000000'

Example:

gdj1.config.colorLabel = '#000000';

markerStrokeWidth (get)

Exists as a property of the config property on the GuitarDiagrams object. Gets the marker's stroke width.

  • Parameters: None
  • Return Value: {number} The marker's stroke width.
  • Default Value: {number} 2

Example:

console.log(gdj1.markerStrokeWidth);

markerStrokeWidth (set)

Exists as a property of the config property on the GuitarDiagrams object. Sets the marker's stroke width.

  • Parameters: {number} The marker's stroke width.
  • Return Value: None
  • Default Value: {number} 2

Example:

gdj1.config.markerStrokeWidth = 1;

markerFontSize (get)

Exists as a property of the config property on the GuitarDiagrams object. Gets the marker's font size.

  • Parameters: None
  • Return Value: {number} The marker's font size.
  • Default Value: {number} 16

Example:

console.log(gdj1.config.markerFontSize);

markerFontSize (set)

Exists as a property of the config property on the GuitarDiagrams object. Sets the marker's font size.

  • Parameters: {number} The marker's font size.
  • Return Value: None
  • Default Value: {number} 16

Example:

gdj1.config.markerFontSize = 10;

fretCount (get)

Exists as a property of the config property on the GuitarDiagrams object. Gets the number of frets on the diagram.

  • Parameters: None
  • Return Value: {number} The number of frets on the diagram.
  • Default Value: {number} 5

Example:

console.log(gdj1.config.fretCount);

fretCount (set)

Exists as a property of the config property on the GuitarDiagrams object. Sets the number of frets on the diagram.

  • Parameters: {number} The number of frets on the diagram.
  • Return Value: None
  • Default Value: {number} 5

Example:

gdj1.config.fretCount = 3;

scaleFactor (get)

Exists as a property of the config property on the GuitarDiagrams object. Gets the scale factor of the diagram.

  • Parameters: None
  • Return Value: {number} The scale factor of the diagram.
  • Default Value: {number} 1

Example:

console.log(gdj1.config.scaleFactor);

scaleFactor (set)

Exists as a property of the config property on the GuitarDiagrams object. Sets the scale factor of the diagram.

  • Parameters: {number} The scale factor of the diagram.
  • Return Value: None
  • Default Value: {number} 1

Example:

gdj1.config.scaleFactor = .6;

orientHorizontally (get)

Exists as a property of the config property on the GuitarDiagrams object. Gets the horizontal status of the diagram.

  • Parameters: None
  • Return Value: {boolean} The horizontal status of diagram.
  • Default Value: {boolean} false;

Example:

console.log(gdj1.config.orientHorizontally);

orientHorizontally (set)

Exists as a property of the config property on the GuitarDiagrams object. Sets the horizontal status of the diagram.

  • Parameters: {boolean} The horizontal status of diagram.
  • Return Value: None
  • Default Value: {boolean} false;

Example:

gdj1.config.orientHorizontally = true;

fretMarkerEnabled (get)

Exists as a property of the config property on the GuitarDiagrams object. Gets the enabled status of fret markers.

  • Parameters: None
  • Return Value: {boolean} The enabled status of fret markers.
  • Default Value: {boolean} true;

Example:

console.log(gdj1.config.fretMarkerEnabled);

fretMarkerEnabled (set)

Exists as a property of the config property on the GuitarDiagrams object. Sets the enabled status of fret markers.

  • Parameters: {boolean} The enabled status of fret markers.
  • Return Value: None
  • Default Value: {boolean} true;

Example:

gdj1.config.fretMarkerEnabled = true;

fretStartingNumber (get)

Exists as a property of the config property on the GuitarDiagrams object. Gets the starting fret number.

  • Parameters: None
  • Return Value: {number} The starting fret number.
  • Default Value: {number} 0;

Example:

console.log(gdj1.config.fretStartingNumber);

fretStartingNumber (set)

Exists as a property of the config property on the GuitarDiagrams object. Sets the starting fret number.

  • Parameters: {number} The starting fret number.
  • Return Value: None
  • Default Value: {number} 0;

Example:

gdj1.config.fretStartingNumber = 3;

stringNamesEnabled (get)

Exists as a property of the config property on the GuitarDiagrams object. Gets the enabled status of string names.

  • Parameters: None
  • Return Value: {boolean} The enabled status of string names.
  • Default Value: {boolean} false;

Example:

console.log(gdj1.config.stringNamesEnabled);

stringNamesEnabled (set)

Exists as a property of the config property on the GuitarDiagrams object. Sets the enabled status of string names.

  • Parameters: {boolean} The enabled status of string names.
  • Return Value: None
  • Default Value: {boolean} false;

Example:

gdj1.config.stringNamesEnabled = true;

stringNames (get)

Exists as a property of the config property on the GuitarDiagrams object. Gets the array of string names.

  • Parameters: None
  • Return Value: {array} The array of string names.
  • Default Value: {array} ['E','A','D','G','B','e'];

Example:

console.log(gdj1.config.stringNames);

stringNames (set)

Exists as a property of the config property on the GuitarDiagrams object. Sets the array of string names.

  • Parameters: {array} The array of string names.
  • Return Value: None
  • Default Value: {array} ['E','A','D','G','B','e'];

Example:

gdj1.config.stringNames = ['D','A','D','G'];

downloadImageEnabled (get)

Exists as a property of the config property on the GuitarDiagrams object. Gets the enabled status of the download image button.

  • Parameters: None
  • Return Value: {boolean} The enabled status of the download image button.
  • Default Value: {boolean} false;

Example:

console.log(gdj1.config.downloadImageEnabled);

downloadImageEnabled (set)

Exists as a property of the config property on the GuitarDiagrams object. Sets the enabled status of the download image button.

  • Parameters: {boolean} The enabled status of the download image button.
  • Return Value: None
  • Default Value: {boolean} false;

Example:

gdj1.config.downloadImageEnabled = true;

guitar-diagrams-config.mjs Public Methods

None.

guitar-diagrams-marker.mjs Class

guitar-diagrams-marker.mjs Constructors (non-default)

Constructor(s) in guitar-diagram-marker.mjs go here... (There's only a default constructor as of now.)

Properties in guitar-diagrams-marker.mjs go here...

Methods in guitar-diagrams-marker.mjs go here...