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

Function normalizePathForComparison

renderer.js:1306–1324  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

1304 const task = renderQueue[i];
1305 if (task && task.filePath === filePath && !task.retainDetached) return task;
1306 }
1307 return null;
1308}
1309
1310/**
1311 * Re-queue thumbnail work for an on-screen cell that still shows the placeholder.
1312 * Virtual-grid keeps existing DOM nodes across scroll frames, so pruned/soft-capped
1313 * jobs would otherwise never start again until the cell is destroyed and recreated.
1314 */
1315function ensureVisibleThumbnailQueued(itemEl, model, thumbPriority) {
1316 if (window._serverBulkThumbnailJobActive) return false;
1317 if (!itemEl || !model || !model.filePath) return false;
1318 if (model.hasThumbnail) return false;
1319 if (hasImageOnlyPreviewMiss(model.filePath)) return false;
1320
1321 const thumbContainer = itemEl.querySelector('.thumbnail-container');
1322 if (!thumbContainer) return false;
1323 const img = thumbContainer.querySelector('img');
1324 if (img && typeof img.src === 'string' && img.src.startsWith('data:image')) return false;
1325
1326 const queued = findQueuedThumbnailTask(model.filePath);
1327 if (queued) {

Callers 15

getGridModelDedupeKeyFunction · 0.85
updateModelElementFunction · 0.85
showModelDetailsFunction · 0.85
renderer.jsFile · 0.85
loadAndRenderModelsFunction · 0.85
scanAndRenderDirectoryFunction · 0.85
renderModelToPNGFunction · 0.85
addToSelectedModelsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected