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

Function clearDirectoryFilter

renderer.js:8317–8335  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8315 const randomItem = visibleModels[randomIndex];
8316 randomItem.classList.add('selected');
8317 if (doScroll) {
8318 randomItem.scrollIntoView({ behavior: 'smooth', block: 'center' });
8319 }
8320 previousItem = randomItem;
8321 return randomItem;
8322 };
8323
8324 // Spin animation without scrolling (to avoid white flashes)
8325 for (let i = 0; i < ROULETTE_SPINS; i++) {
8326 await new Promise(resolve => setTimeout(resolve, delay));
8327 highlightRandom(); // no scrolling on intermediate spins
8328 delay += ROULETTE_DELAY_INCREMENT; // Gradually slow down
8329 }
8330
8331 // Final selection with scrolling.
8332 const finalItem = highlightRandom(true);
8333 const filePath = finalItem.getAttribute('data-filepath');
8334
8335 // Add winning animation class
8336 finalItem.classList.add('roulette-winner');
8337 setTimeout(() => finalItem.classList.remove('roulette-winner'), 3000);
8338

Callers

nothing calls this directly

Calls 1

displayModelsFunction · 0.85

Tested by

no test coverage detected