Fix input centering and smooth clock hand

This commit is contained in:
Kiyomichi Kosaka 2025-06-14 23:52:10 +02:00
parent 60b331369b
commit 95891013d1
2 changed files with 6 additions and 5 deletions

View File

@ -89,9 +89,9 @@
function updateClock() {
const now = new Date();
const cob = toCobiets(now);
const xf = (cob % COBIE_UNITS.quantic) / COBIE_UNITS.quantic;
const qf = (cob % COBIE_UNITS.chronon) / COBIE_UNITS.chronon;
const cf = (cob % COBIE_UNITS.eonstrip) / COBIE_UNITS.eonstrip;
const xf = cob / COBIE_UNITS.quantic;
const qf = cob / COBIE_UNITS.chronon;
const cf = cob / COBIE_UNITS.eonstrip;
document.getElementById('handXeno').style.transform = `rotate(${xf * 360}deg)`;
document.getElementById('handQuantic').style.transform = `rotate(${qf * 360}deg)`;
document.getElementById('handChronon').style.transform = `rotate(${cf * 360}deg)`;

View File

@ -949,10 +949,11 @@ function enterEdit() {
input.style.border = 'none';
input.style.color = 'inherit';
input.style.textAlign = 'center';
input.style.width = '12ch';
input.style.width = '100%';
input.style.boxSizing = 'border-box';
// keep the input visually centered like the original span
input.style.display = 'block';
input.style.margin = '0 auto';
input.style.margin = '10px 0';
span.replaceWith(input);
input.focus();
input.setSelectionRange(1, val.length);