MCPcopy Index your code
hub / github.com/cifertech/DisplayKit / selectElement

Function selectElement

app.js:4650–4667  ·  view source on GitHub ↗
(id, push = true)

Source from the content-addressed store, hash-verified

4648
4649
4650function selectElement(id, push = true) {
4651 selectedId = id;
4652 selectedIds = new Set([id]);
4653 updatePropsInputs();
4654 renderElements();
4655 renderLayers();
4656 if (push) pushHistory();
4657
4658 // Add visual feedback for selection
4659 setTimeout(() => {
4660 const elementDiv = document.querySelector(`[data-id="${id}"]`);
4661 if (elementDiv) {
4662 elementDiv.style.animation = 'none';
4663 elementDiv.offsetHeight; // Trigger reflow
4664 elementDiv.style.animation = 'pulse 0.3s ease-out';
4665 }
4666 }, 50);
4667}
4668
4669function toggleSelectElement(id, push = true) {
4670 if (!selectedIds || !(selectedIds instanceof Set)) selectedIds = new Set();

Callers 5

app.jsFile · 0.85
enableDragFunction · 0.85
renderLayersFunction · 0.85
selectNextElementFunction · 0.85
selectPreviousElementFunction · 0.85

Calls 4

updatePropsInputsFunction · 0.85
renderElementsFunction · 0.85
renderLayersFunction · 0.85
pushHistoryFunction · 0.85

Tested by

no test coverage detected