Skip to content

Commit a03a49d

Browse files
committed
fix: adjust drawValueArea text offset based on toggle state in ResolutionMaster canvas
1 parent 0230aa9 commit a03a49d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

js/ResolutionMaster.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1356,7 +1356,8 @@ class ResolutionMasterCanvas {
13561356
ctx.font = "bold 11px Arial";
13571357
ctx.textAlign = "center";
13581358
ctx.textBaseline = "middle";
1359-
ctx.fillText(text, x + w / 2, y + h / 2 + 1);
1359+
const textOffset = isOn ? -(h * 0.25) : (h * 0.25);
1360+
ctx.fillText(text, x + w / 2 + textOffset, y + h / 2 + 1);
13601361
}
13611362

13621363
drawValueAreaHoverBackground(ctx, controlName, x, y, w, h, color, borderRadius = 4) {

0 commit comments

Comments
 (0)