fix(tech): auto zoom in after fitToView for readable labels

Programmatically click the zoom-in button 4 times after Isoflow renders
to increase the default zoom from ~56% to ~90-100%, making node labels
clearly readable without manual interaction.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Thomas Davis 2026-02-09 19:54:29 +10:00
parent 6eb0ce7e23
commit 7327992a9d

View file

@ -129,6 +129,15 @@ try {
}),
document.getElementById('root')
);
// After fitToView renders, zoom in for better label readability
setTimeout(() => {
const zoomIn = document.querySelector('[aria-label="Zoom in"]') ||
[...document.querySelectorAll('button')].find(b => b.textContent.trim() === '+');
if (zoomIn) {
for (let i = 0; i < 4; i++) setTimeout(() => zoomIn.click(), i * 100);
}
}, 1500);
} catch (err) {
console.error('Isoflow load error:', err);
document.getElementById('root').innerHTML =