mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-07 01:51:36 -04:00
Added synced scrolling (#386)
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
parent
164b5436ae
commit
73007ef597
10 changed files with 413 additions and 38 deletions
15
src/components/editor/scroll/scroll-props.ts
Normal file
15
src/components/editor/scroll/scroll-props.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
export interface ScrollProps {
|
||||
scrollState?: ScrollState
|
||||
onScroll?: (scrollState: ScrollState) => void
|
||||
onMakeScrollSource?: () => void
|
||||
}
|
||||
|
||||
export interface ScrollState {
|
||||
firstLineInView: number
|
||||
scrolledPercentage: number
|
||||
}
|
||||
|
||||
export interface DualScrollState {
|
||||
editorScrollState: ScrollState
|
||||
rendererScrollState: ScrollState
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue