API Docs for: 1.4.4
Show:

ugsEditorPlus.actions Class

Does the work by providing "doAction" method to respond to events (does not attach event handlers); Modifes some page elements -- adjust CSS classes on page, runs Scriptasaurus, etc.

Methods

doAction

(
  • action
  • value
)
private

Executes the requested Action using passed in Value

Parameters:

  • action String

    Action's name; must match one of those defined in the switch below

  • value String

    Value used by Action (OK, a couple methods assume this is boolean/falsy)

doLayout

(
  • value
)
private

Changes positions for Reference Chord Diagrams -- handled entirely via CSS classes

Parameters:

  • value String

    value of the clicked value item

doPlacement

(
  • value
)
Boolean private

Chord Name placement (& "Mini-chord diagrams"). Returns true if Scriptasaurus should be rerun.

Parameters:

  • value String

    value of the clicked value item

Returns:

Boolean:

doSetDiagramSize

(
  • value
)
private

Zooms (scales) chord diagrams

Parameters:

  • value String

    percentage, integer between 0 and, well, 100?; value of the clicked value item

doSetFontSize

(
  • value
)
private

Zooms (scales) fonts

Parameters:

  • value String

    point-size; value of the clicked value item

doSetPageWidth

(
  • value
)
private

(option dialog) changes body class, moving the right page edge

Parameters:

  • value String

    currently selected option value

doSetTheme

(
  • value
)
private

Change the color scheme -- requires changing CSS Class and reruning (to regenerate reference chord diagrams)

Parameters:

  • value String

    value of the clicked value item

doTranspose

(
  • value
)
private

Parses Value to decide number of steps "up" or "down", then fires off transpose

Parameters:

  • value String

    value of the clicked value item

doTuning

(
  • value
)
private

Change the instrument (tuning)

Parameters:

  • value String

    value of the clicked value item

doUpdate

() private

Rerun for new song text; updates UI

init

() public

Sets up this class; modifies form elements; attaches event handlers, etc

resetTranspose

(
  • keyChord
)
private

Sets Transpose menu's selected value to "Original"; adds example chord names

Parameters:

  • keyChord String

run

(
  • isDoBackup
)

Rebuilds song, info, chord diagrams using current settings.

Parameters:

  • isDoBackup Bool

    true forces backup; optional, default false.

setCommonChordsList

(
  • chordList
)
Void private

the list of common chords has been change; update UGS setting

Parameters:

  • chordList Mixed

    Either string, as comma seperated values list, or array of chord names

Returns:

Void:

setEnclosureVisible

(
  • isVisible
)
private

(option dialog) change whether to show/hide the bracket characters

Parameters:

  • isVisible Bool

setIgnoreCommon

(
  • isIgnore
)
private

"Ignore Common" was checked, need to update master chord diagrams

Parameters:

  • isIgnore Bool

setSortAlphabetical

(
  • isAlphabetical
)
private

(option dialog) change whether reference diagrams are sorted alphabetically or by their "song order"

Parameters:

  • isAlphabetical Bool

transpose

(
  • steps
)

Rebuilds song as "run", but first transposes chords

Parameters:

  • steps Int

    number of semitones, +/-6

Properties

_ele

JSON private

associative array/JSON handles to key/frequently accessed DOM Elements (see init()

_prevValues

JSON

associative array/JSON of last click value used; intended to be used to prevent rerunning more expensize operations unnecessailry (when the value didn't actually change)

_public

JsonObject public

attach public members to this object