mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-24 21:12:38 -04:00
8 lines
256 B
TypeScript
8 lines
256 B
TypeScript
|
import { EditorView } from '@codemirror/view'
|
||
|
import { Change } from '../../../../../types/change'
|
||
|
|
||
|
export const isInViewport =
|
||
|
(view: EditorView) =>
|
||
|
(change: Change): boolean =>
|
||
|
change.op.p >= view.viewport.from && change.op.p <= view.viewport.to
|