()
| 3381 | } |
| 3382 | |
| 3383 | function removeUnusedAssets() { |
| 3384 | const used = new Set(); |
| 3385 | (screens || []).forEach((scr) => (scr.elements || []).forEach((el) => { if (el && el.assetId) used.add(el.assetId); })); |
| 3386 | const before = (assets || []).length; |
| 3387 | assets = (assets || []).filter((a) => a && used.has(a.id)); |
| 3388 | const after = (assets || []).length; |
| 3389 | if (before !== after) { |
| 3390 | renderAssets(); |
| 3391 | pushHistory(); |
| 3392 | } |
| 3393 | } |
| 3394 | |
| 3395 | |
| 3396 | function convertToOLEDColor(color) { |
no test coverage detected