Analog clock addition

(cherry picked from commit 7bae93fdb2744b0deab84882506a333ff809b3a3)
This commit is contained in:
Ashley M. Kirchner
2016-07-08 18:57:23 -06:00
parent 8f02cb83ed
commit a9540ffabe
2 changed files with 12 additions and 1 deletions

View File

@@ -18,6 +18,7 @@ Module.register("clock",{
analogSize: '200px',
analogFace: false,
analogPlacement: 'bottom',
secondsColor: '#888888',
},
// Define required scripts.
getScripts: function() {
@@ -141,11 +142,14 @@ Module.register("clock",{
clockSecond.id = "clockSecond";
clockSecond.style.transform = "rotate(" + second + "deg)";
clockSecond.className = "clockSecond";
clockSecond.style.backgroundColor = this.config.secondsColor;
// Combine analog wrappers
clockFace.appendChild(clockHour);
clockFace.appendChild(clockMinute);
clockFace.appendChild(clockSecond);
if (this.config.displaySeconds) {
clockFace.appendChild(clockSecond);
}
clockCircle.appendChild(clockFace);
}