(selection: any)
| 12 | } |
| 13 | } |
| 14 | export const getTextOptions = (selection: any) => { |
| 15 | const selectionMetadata = getSelectionMetadata(selection) |
| 16 | if (selection._objects) { |
| 17 | const object = selection._objects[0] |
| 18 | const { underline, textAlign, fontSize, fill, charSpacing, lineHeight, fontFamily } = object |
| 19 | return { |
| 20 | underline, |
| 21 | textAlign, |
| 22 | fontSize, |
| 23 | fill, |
| 24 | charSpacing, |
| 25 | lineHeight, |
| 26 | fontFamily, |
| 27 | ...selectionMetadata, |
| 28 | } |
| 29 | } else { |
| 30 | const { underline, textAlign, fontSize, fill, charSpacing, lineHeight, fontFamily } = selection |
| 31 | return { |
| 32 | underline, |
| 33 | textAlign, |
| 34 | fontSize, |
| 35 | fill, |
| 36 | charSpacing, |
| 37 | lineHeight, |
| 38 | fontFamily, |
| 39 | ...selectionMetadata, |
| 40 | } |
| 41 | } |
| 42 | } |
no test coverage detected