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

Function populateDesignerDropdown

renderer.js:13725–13741  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13723
13724 updateSelectedCount();
13725}
13726
13727// Sync DOM selection state with selectedModels
13728function syncDOMSelectionWithSelectedModels() {
13729 document.querySelectorAll('.file-item').forEach(item => {
13730 const itemPath = item.getAttribute('data-filepath') || item.dataset.filepath;
13731 if (itemPath && isInSelectedModels(itemPath)) {
13732 item.classList.add('selected');
13733 } else {
13734 item.classList.remove('selected');
13735 }
13736 });
13737}
13738
13739// Ensure all visually selected items are in selectedModels
13740function syncSelectedModelsWithDOM() {
13741 document.querySelectorAll('.file-item.selected').forEach(item => {
13742 const itemPath = item.getAttribute('data-filepath') || item.dataset.filepath;
13743 if (itemPath && !isInSelectedModels(itemPath)) {
13744 addToSelectedModels(itemPath);

Callers 4

runScanSTLHomeImplFunction · 0.85
renderer.jsFile · 0.85
refreshMetadataDropdownsFunction · 0.85
performSTLHomeScanFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected