watcharea rows match color of watcharea

This commit is contained in:
BroodjeAap 2020-07-12 18:48:27 +00:00
parent a6864c1928
commit a88837f90f
2 changed files with 3 additions and 3 deletions

View file

@ -75,8 +75,8 @@ document.addEventListener("DOMContentLoaded", function(){
function draw(){
ctx.clearRect(0, 0, canvas.width, canvas.height);
drawImage();
watchArea.draw(ctx);
watchAreas.forEach(watchArea => watchArea.draw(ctx));
watchArea.draw(ctx);
}
function drawImage(){

View file

@ -11,7 +11,7 @@
<img src="{{ .GetCurrentURL }}" width="425" height="240">
</div>
<form action="/addWatchArea" method="GET" id="newWatchAreaForm">
<table class="pure-table pure-table-horizontal pure-table-striped">
<table class="pure-table pure-table-horizontal">
<caption>Watches</caption>
<thead>
<tr>
@ -34,7 +34,7 @@
</thead>
<tbody id="watchAreas">
{{range $watchArea := .WatchAreas}}
<tr>
<tr style="background-color:rgb({{ $watchArea.Color.R }}, {{$watchArea.Color.G}}, {{$watchArea.Color.B}})">
<td>{{ $watchArea.Name }}</td>
<td>{{ $watchArea.Color.R }}</td>
<td>{{ $watchArea.Color.G }}</td>