Update numbers when marker is hovered on and then loses focus

This commit is contained in:
2025-08-25 12:14:19 -05:00
parent 315b220724
commit 6384cbe101

View File

@@ -832,6 +832,19 @@ class GuitarDiagramsWebComponent extends HTMLElement {
canvas.fillStyle = marker.colorFill;
this.#drawMarkerCircle(marker.relativePosX, marker.relativePosY);
canvas.closePath();
canvas.beginPath();
canvas.fillStyle = marker.colorFont;
canvas.textAlign = "center";
canvas.textBaseline = "middle";
canvas.font = this.#scale(this.#config.markerFontSize) + "px Arial";
canvas.fillText(
marker.text,
marker.relativePosX,
marker.relativePosY + this.#scale(this.#config.markerStrokeWidth),
);
canvas.fill();
canvas.closePath();
}
}
});