diff --git a/calenderwatch_client.wgt b/calenderwatch_client.wgt index c399ac3..d291370 100644 Binary files a/calenderwatch_client.wgt and b/calenderwatch_client.wgt differ diff --git a/js/app.js b/js/app.js index b4bff0d..741684f 100644 --- a/js/app.js +++ b/js/app.js @@ -20,7 +20,7 @@ var STORAGE_SPACE = "downloads"; var SHORT_WAIT = 10000; var LONG_WAIT = 30000; // 600000 -var DESIGN = 1; // 0 - longitude, 1 - mission control +var DESIGN = 2; // 0 - longitude, 1 - mission control var wait_time = LONG_WAIT; var events = null; var deviceFingerprint = null; @@ -425,6 +425,18 @@ var flagDigital = true; renderCircle(ctxContent, polToCart(sunDistance, hourToAngle(hour + minute / 60)), 16, sunColor); } + function renderSmallSun(date, hour, minute, second) { + + if(hour > 6 && hour < 18) + sunColor = "#FFD700"; + else { + sunColor = "#C0C0C0" + } + + sunDistance = document.body.clientWidth / 2 - 30; + renderCircle(ctxContent, polToCart(sunDistance, hourToAngle(hour + minute / 60)), 10, sunColor); + } + function renderEarth(date, minute, second) { var earthColor = "#0077BE"; @@ -513,7 +525,10 @@ var flagDigital = true; renderSun(date, hour, minute, second); renderEarth(ctxContent, minute, second); } else if(DESIGN === 1) { - drawMissionControl(); + drawDigitalWatch(); + } else if(DESIGN === 2) { + drawDigitalWatch(); + renderSmallSun(date, hour, minute, second); } @@ -544,9 +559,10 @@ var flagDigital = true; var thickness = 18; } else if(DESIGN === 1) { var thickness = 50; + } else if(DESIGN === 2) { + var thickness = 18; } - console.log("switched to long wait"); wait_time = LONG_WAIT; @@ -606,6 +622,9 @@ var flagDigital = true; } else if(DESIGN === 1) { var edge = document.body.clientWidth / 2 - thickness / 2 - 2; renderArc(ctxContent, center, edge, thickness, e.color, hourToAngle(startTime), hourToAngle(stopTime), true, true); + } else if(DESIGN === 2) { + var edge = document.body.clientWidth / 2 - thickness / 2 - 2; + renderArc(ctxContent, center, edge, thickness, e.color, hourToAngle(startTime), hourToAngle(stopTime), startedBeforeToday, endsAfterToday); } } @@ -616,12 +635,14 @@ var flagDigital = true; for(var i = 0; i < 24; i++) { renderSimpleArc(ctxContent, center, edge, thickness, "#000000", i*15-0.8, i*15+0.8); } + } else if(DESIGN === 2) { + } } - function drawMissionControl(datetime) { + function drawDigitalWatch(datetime) { var strHours = document.getElementById("str-hours"), strConsole = document.getElementById("str-console"), strMinutes = document.getElementById("str-minutes"),