mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
Analog clock addition
(cherry picked from commit 7bae93fdb2744b0deab84882506a333ff809b3a3)
This commit is contained in:
parent
8f02cb83ed
commit
a9540ffabe
@ -87,6 +87,13 @@ The following properties can be configured:
|
||||
<br><b>Default value:</b> <code>false</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>secondsColor</code></td>
|
||||
<td>**Specific to the analog clock** Specifies what color to make the 'seconds' hand.<br>
|
||||
<br><b>Possible values:</b> <code>any HTML RGB Color</code>
|
||||
<br><b>Default value:</b> <code>#888888</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>analogPlacement</code></td>
|
||||
<td>**Specific to the analog clock** *(requires displayType set to <code>'both'</code>)* Specifies where the analog clock is in relation to the digital clock<br>
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user