ColorInput + ColorOutput

This commit is contained in:
Ángel Montero Lamas 2024-09-15 12:55:14 +02:00
parent 7ff5d1053f
commit c22eafbe2f
2 changed files with 3 additions and 2 deletions

View file

@ -1125,7 +1125,8 @@
<tr data-tip="Set the color of grid cell numbers">
<td>Cell num color</td>
<td>
<input id="gridCellNumbersStrokeColor" type="color" value="#000000" />
<input id="gridCellNumbersColorInput" type="color" value="#000000" />
<output id="gridCellNumbersColorOutput">#000000</output>
</td>
</tr>
</tbody>

View file

@ -549,7 +549,7 @@ byId("gridCellNumbers")?.addEventListener("change", function() {
if (layerIsOn("toggleGrid")) drawGrid();
});
document.getElementById("gridCellNumbersColor").addEventListener("input", updateGridCellNumbersStyle);
ById("gridCellNumbersColor").addEventListener("input", updateGridCellNumbersStyle);
function updateGridCellNumbersStyle() {
const color = document.getElementById("gridCellNumbersColor").value;