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:
parent
6eb0ce7e23
commit
7327992a9d
1 changed files with 9 additions and 0 deletions
|
|
@ -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 =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue