MCPcopy Create free account
hub / github.com/TechJeeper/Printventory / performSTLHomeScan

Function performSTLHomeScan

renderer.js:8417–8431  ·  view source on GitHub ↗
(stlHomeDir)

Source from the content-addressed store, hash-verified

8415 randomItem.classList.add('selected');
8416 if (doScroll) {
8417 randomItem.scrollIntoView({ behavior: 'smooth', block: 'center' });
8418 }
8419 previousItem = randomItem;
8420 return randomItem;
8421 };
8422
8423 // Spin animation without scrolling (to avoid white flashes)
8424 for (let i = 0; i < ROULETTE_SPINS; i++) {
8425 await new Promise(resolve => setTimeout(resolve, delay));
8426 highlightRandom(); // no scrolling on intermediate spins
8427 delay += ROULETTE_DELAY_INCREMENT; // Gradually slow down
8428 }
8429
8430 // Final selection with scrolling.
8431 const finalItem = highlightRandom(true);
8432 const filePath = finalItem.getAttribute('data-filepath');
8433
8434 // Add winning animation class

Callers 3

runScanFunction · 0.85
saveSTLHomeFromDialogFunction · 0.85
renderer.jsFile · 0.85

Calls 5

scanAndRenderDirectoryFunction · 0.85
populateDesignerDropdownFunction · 0.85
populateTagFilterFunction · 0.85
populateLicenseFilterFunction · 0.85

Tested by

no test coverage detected