Align grid numbers.
This commit is contained in:
parent
010713f503
commit
69af74102d
@ -599,23 +599,25 @@ const INTERFACE = {
|
||||
ctx.fillText(letters[i + 5], x, y);
|
||||
}
|
||||
|
||||
let number_offset_x = -1.15 * radius;
|
||||
let number_offset_y = -0.75 * gui_scale;
|
||||
|
||||
ctx.textAlign = "center";
|
||||
for(let i = 0; i < 5; ++i) {
|
||||
let x = basis_x - (1.15 * radius);
|
||||
let y = basis_y - (gui_scale * (0.75 + (2 * i)));
|
||||
let y = basis_y - (gui_scale * 2 * i);
|
||||
|
||||
ctx.save();
|
||||
ctx.translate(x, y);
|
||||
ctx.translate(basis_x + number_offset_x, y + number_offset_y);
|
||||
ctx.rotate(-Math.PI / 3);
|
||||
ctx.fillText(numbers[i], 0, 0);
|
||||
ctx.restore();
|
||||
}
|
||||
for(let i = 0; i < 4; ++i) {
|
||||
let x = basis_x + (1.5 * radius * (i + 0.25));
|
||||
let y = basis_y - (gui_scale * (9.75 + i));
|
||||
let x = basis_x + (1.5 * radius * (1 + i));
|
||||
let y = basis_y - (gui_scale * (9 + i));
|
||||
|
||||
ctx.save();
|
||||
ctx.translate(x, y);
|
||||
ctx.translate(x + number_offset_x, y + number_offset_y);
|
||||
ctx.rotate(-Math.PI / 3);
|
||||
ctx.fillText(numbers[i + 5], 0, 0);
|
||||
ctx.restore();
|
||||
|
Loading…
x
Reference in New Issue
Block a user