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.
Item Index
Methods
Properties
Methods
doAction
-
action
-
value
Executes the requested Action using passed in Value
Parameters:
-
action
StringAction's name; must match one of those defined in the switch below
-
value
StringValue used by Action (OK, a couple methods assume this is boolean/falsy)
doLayout
-
value
Changes positions for Reference Chord Diagrams -- handled entirely via CSS classes
Parameters:
-
value
Stringvalue of the clicked value item
doPlacement
-
value
Chord Name placement (& "Mini-chord diagrams"). Returns true if Scriptasaurus should be rerun.
Parameters:
-
value
Stringvalue of the clicked value item
Returns:
doSetDiagramSize
-
value
Zooms (scales) chord diagrams
Parameters:
-
value
Stringpercentage, integer between 0 and, well, 100?; value of the clicked value item
doSetFontSize
-
value
Zooms (scales) fonts
Parameters:
-
value
Stringpoint-size; value of the clicked value item
doSetPageWidth
-
value
(option dialog) changes body class, moving the right page edge
Parameters:
-
value
Stringcurrently selected option value
doSetTheme
-
value
Change the color scheme -- requires changing CSS Class and reruning (to regenerate reference chord diagrams)
Parameters:
-
value
Stringvalue of the clicked value item
doTranspose
-
value
Parses Value to decide number of steps "up" or "down", then fires off transpose
Parameters:
-
value
Stringvalue of the clicked value item
doTuning
-
value
Change the instrument (tuning)
Parameters:
-
value
Stringvalue 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
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
Booltrue forces backup; optional, default false.
setCommonChordsList
-
chordList
the list of common chords has been change; update UGS setting
Parameters:
-
chordList
MixedEither string, as comma seperated values list, or array of chord names
Returns:
setEnclosureVisible
-
isVisible
(option dialog) change whether to show/hide the bracket characters
Parameters:
-
isVisible
Bool
setIgnoreCommon
-
isIgnore
"Ignore Common" was checked, need to update master chord diagrams
Parameters:
-
isIgnore
Bool
setSortAlphabetical
-
isAlphabetical
(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
Intnumber 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