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

Function toggleGroup

renderer.js:19705–19717  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19703 // Preserve virtual-grid and grouped-highlight state before replacing the node.
19704 const preservedLayoutKey = fileItem.dataset.layoutKey || '';
19705 const preservedParentGroupKey = fileItem.dataset.parentGroupKey || '';
19706 const preserveGroupedClasses = [
19707 'parent-model-group-child',
19708 'parent-model-group-child-start',
19709 'parent-model-group-child-middle',
19710 'parent-model-group-child-end',
19711 'parent-model-group-child-single'
19712 ];
19713 const groupedClassesToRestore = preserveGroupedClasses.filter(cls => fileItem.classList.contains(cls));
19714
19715 // Remove the old item
19716 fileItem.remove();
19717
19718 // Create a new item with the updated thumbnail
19719 const newItem = createModelItem(model, currentGridView);
19720 newItem.dataset.index = itemIndex;

Callers 1

Calls 1

renderVirtualGridFunction · 0.85

Tested by

no test coverage detected