(rect: DOMRect, compareRect: DOMRect)
| 6 | import { Editable } from '../plugin/editable' |
| 7 | |
| 8 | const doRectsIntersect = (rect: DOMRect, compareRect: DOMRect) => { |
| 9 | const middle = (compareRect.top + compareRect.bottom) / 2 |
| 10 | |
| 11 | return rect.top <= middle && rect.bottom >= middle |
| 12 | } |
| 13 | |
| 14 | const areRangesSameLine = (editor: Editable, range1: Range, range2: Range) => { |
| 15 | const rect1 = Editable.toDOMRange(editor, range1).getBoundingClientRect() |
no outgoing calls
no test coverage detected
searching dependent graphs…