feat: add frozen scroll method in editor.scrollManager, resolved #564

This commit is contained in:
qishaoxuan
2022-07-27 19:06:59 +08:00
parent 937221a040
commit 439eb90e93
2 changed files with 76 additions and 3 deletions

View File

@@ -62,12 +62,15 @@ export function Page(props: PageProps) {
}, [user, props.workspace, page_id]);
const onScroll = (event: UIEvent) => {
editorRef.current.scrollManager.scrollContainer =
scrollContainerRef.current;
editorRef.current.getHooks().onRootNodeScroll(event);
editorRef.current.scrollManager.emitScrollEvent(event);
};
useEffect(() => {
editorRef.current.scrollManager.scrollContainer =
scrollContainerRef.current;
}, []);
return (
<LigoApp>
<LigoLeftContainer style={{ width: fixedDisplay ? '300px' : 0 }}>