watcharea rows match color of watcharea
This commit is contained in:
parent
a6864c1928
commit
a88837f90f
2 changed files with 3 additions and 3 deletions
|
@ -75,8 +75,8 @@ document.addEventListener("DOMContentLoaded", function(){
|
||||||
function draw(){
|
function draw(){
|
||||||
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
||||||
drawImage();
|
drawImage();
|
||||||
watchArea.draw(ctx);
|
|
||||||
watchAreas.forEach(watchArea => watchArea.draw(ctx));
|
watchAreas.forEach(watchArea => watchArea.draw(ctx));
|
||||||
|
watchArea.draw(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
function drawImage(){
|
function drawImage(){
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<img src="{{ .GetCurrentURL }}" width="425" height="240">
|
<img src="{{ .GetCurrentURL }}" width="425" height="240">
|
||||||
</div>
|
</div>
|
||||||
<form action="/addWatchArea" method="GET" id="newWatchAreaForm">
|
<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>
|
<caption>Watches</caption>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="watchAreas">
|
<tbody id="watchAreas">
|
||||||
{{range $watchArea := .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.Name }}</td>
|
||||||
<td>{{ $watchArea.Color.R }}</td>
|
<td>{{ $watchArea.Color.R }}</td>
|
||||||
<td>{{ $watchArea.Color.G }}</td>
|
<td>{{ $watchArea.Color.G }}</td>
|
||||||
|
|
Loading…
Add table
Reference in a new issue