summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Davison <snapwilliam@gmail.com>2012-12-26 12:41:16 -0800
committerPatrick Davison <snapwilliam@gmail.com>2012-12-26 12:41:16 -0800
commit15e25ed9bc50ab8f2d99037f6d88d0c5cd1441a8 (patch)
treef8393878f1196b116c726927df7f84155877e87b
parente284051105d820c5df1487fc0c811a01a0883472 (diff)
downloadpathery-15e25ed9bc50ab8f2d99037f6d88d0c5cd1441a8.tar.xz
Added colors for dual-path numbers.
-rw-r--r--js/mapspecs.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/js/mapspecs.js b/js/mapspecs.js
index 43e6c56..e1def28 100644
--- a/js/mapspecs.js
+++ b/js/mapspecs.js
@@ -353,10 +353,14 @@ function doanimate(x, y, p, c, mapid, pathNumber) {
//Display movecount
- if (mapdata[mapid].moveCount[1] > 0 && mapdata[mapid].moveCount[0] > 0)
- updateDsp(mapid, 'dspCount', mapdata[mapid].moveCount[0] + ' + ' + mapdata[mapid].moveCount[1] + ' = ' + count[mapid] + " moves");
- else
+ if (mapdata[mapid].moveCount[1] > 0 && mapdata[mapid].moveCount[0] > 0) {
+ var colorScores = '<span class="green">' + mapdata[mapid].moveCount[0] + '</span> + ';
+ colorScores += '<span class="red">' + mapdata[mapid].moveCount[1] + '</span> = ' + count[mapid] + " moves";
+ updateDsp(mapid, 'dspCount', colorScores);
+ //updateDsp(mapid, 'dspCount', '<span class="green">' + mapdata[mapid].moveCount[0] + ' + ' + mapdata[mapid].moveCount[1] + ' = ' + count[mapid] + " moves");
+ } else {
updateDsp(mapid, 'dspCount', count[mapid]+ " moves");
+ }
//document.getElementById(mapid+',dspCount').innerHTML = count[mapid]+ " moves";
//Get a handle on the element.