(node: AltNode, isJsx: boolean)
| 110 | * if rotation was changed, let it be perceived. Therefore, 1 => 45 |
| 111 | */ |
| 112 | export const htmlRotation = (node: AltNode, isJsx: boolean): string[] => { |
| 113 | const rotation = |
| 114 | -Math.round((node.rotation || 0) + (node.cumulativeRotation || 0)) || 0; |
| 115 | |
| 116 | if (rotation !== 0) { |
| 117 | return [ |
| 118 | formatWithJSX( |
| 119 | "transform", |
| 120 | isJsx, |
| 121 | `rotate(${numberToFixedString(rotation)}deg)`, |
| 122 | ), |
| 123 | formatWithJSX("transform-origin", isJsx, "top left"), |
| 124 | ]; |
| 125 | } |
| 126 | return []; |
| 127 | }; |
no test coverage detected