(el)
| 4991 | } |
| 4992 | |
| 4993 | function getImageDimsForElement(el) { |
| 4994 | if (!el) return null; |
| 4995 | if (el.imageWidth && el.imageHeight) return { w: el.imageWidth, h: el.imageHeight }; |
| 4996 | const a = getAssetById(el.assetId); |
| 4997 | if (a && a.width && a.height) return { w: a.width, h: a.height }; |
| 4998 | return null; |
| 4999 | } |
| 5000 | |
| 5001 | function getSelectionBoundsPx(ids) { |
| 5002 | const sels = (ids && ids.length ? ids : (selectedIds && selectedIds.size ? Array.from(selectedIds) : [])).map((id) => elements.find((e) => e.id === id)).filter(Boolean); |
no test coverage detected