(id, push = true)
| 4648 | |
| 4649 | |
| 4650 | function 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 | |
| 4669 | function toggleSelectElement(id, push = true) { |
| 4670 | if (!selectedIds || !(selectedIds instanceof Set)) selectedIds = new Set(); |
no test coverage detected