mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
Analog clock addition
(cherry picked from commit 7bae93fdb2744b0deab84882506a333ff809b3a3)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user