( sharedRoot: Y.XmlText, editorRoot: Node, range: RelativeRange, )
| 243 | } |
| 244 | |
| 245 | export function relativeRangeToEditorRange( |
| 246 | sharedRoot: Y.XmlText, |
| 247 | editorRoot: Node, |
| 248 | range: RelativeRange, |
| 249 | ): BaseRange | null { |
| 250 | const anchor = relativePositionToEditorPoint(sharedRoot, editorRoot, range.anchor) |
| 251 | |
| 252 | if (!anchor) { |
| 253 | return null |
| 254 | } |
| 255 | |
| 256 | const focus = relativePositionToEditorPoint(sharedRoot, editorRoot, range.focus) |
| 257 | |
| 258 | if (!focus) { |
| 259 | return null |
| 260 | } |
| 261 | |
| 262 | return { anchor, focus } |
| 263 | } |
no test coverage detected
searching dependent graphs…