From 8ef9ad0d62f3ebe003cc2dc2ed4b0f3a33facd4b Mon Sep 17 00:00:00 2001 From: jeremy Date: Thu, 21 Aug 2014 12:32:38 -0400 Subject: [PATCH] update link fix, color arrays split color arrays into two groups created color pallete dynamically based on color pallate array changed demo links --- boxfrets.js | 38 +++++++++++++++++++++++++++++--------- fretboard.css | 2 +- fretboard.html | 33 +++++++++++++++++++-------------- 3 files changed, 49 insertions(+), 24 deletions(-) diff --git a/boxfrets.js b/boxfrets.js index 57e0bc3..6ffb920 100644 --- a/boxfrets.js +++ b/boxfrets.js @@ -1,9 +1,7 @@ /* code to handle manipulation */ var GUITAR_STRINGS; var COLOR = "lightgreen"; -//var PALLETE_COLORS = ["orange", "green", "blue", "yellow", "lightgreen", "red", "transparent"] -//var POSSIBLE_COLORS2 = ["orange", "green", "blue", "yellow", "lightgreen", "red", "i_root", "transparent"] -var POSSIBLE_COLORS = [ +var INTERVAL_COLORS = [ "i_root", "i_flatnine", "i_nine", @@ -17,15 +15,21 @@ var POSSIBLE_COLORS = [ "i_flatseventh", "i_seventh", "i_passing", + "white", + "black" + ] + +var PALLETE_COLORS = [ "orange", "green", "blue", "yellow", "lightgreen", "red", - "black", - "white", - "transparent"]; + "transparent" + ] + +var POSSIBLE_COLORS = INTERVAL_COLORS.concat(PALLETE_COLORS);// concat interval and pallete colors var ERASER = false; var BRUSH = false; var SETTINGROOT = false; @@ -416,13 +420,14 @@ var ctrl_addDashNotegroups = function(idStr){ function(){ ctl_stopPlayer(); $(this).remove(); - update_link(); + //update_link(); } ).click( // set notegroups on abridged Div click function(){ //var abDivArrID = this.attributes["notegroup"].value.split('_'); set_notes_per_notegroup(arrID[0], arrID[1], arrID[2]); + //update_link(); } ); @@ -653,6 +658,14 @@ var updateSetRootView = function(){ // }); // } +var populateColorPalleteChooser = function(){ + html = "Palette:"; + for(var i=0; i < PALLETE_COLORS.length; i++){ + html += ''; + } + $('#colorchooser').append(html); + +} var populateNotegroupsUnabridged = function(){ var html = '