reiji-h 2 лет назад
Родитель
Сommit
63a9c966ed
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      apps/app/src/components/PageEditor/PageEditor.tsx

+ 2 - 2
apps/app/src/components/PageEditor/PageEditor.tsx

@@ -457,7 +457,7 @@ export const PageEditor = React.memo((props: Props): JSX.Element => {
     }
   }, [codeMirrorEditor, previewRef]);
 
-  const scrollEditorHandlerThrottle = useMemo(() => throttle(20, scrollEditorHandler), [scrollEditorHandler]);
+  const scrollEditorHandlerThrottle = useMemo(() => throttle(150, scrollEditorHandler), [scrollEditorHandler]);
 
   const scrollPreviewHandler = useCallback(() => {
     console.log('ScrollPreview!');
@@ -466,7 +466,7 @@ export const PageEditor = React.memo((props: Props): JSX.Element => {
     }
   }, [codeMirrorEditor, previewRef]);
 
-  const scrollPreviewHandlerThrottle = useMemo(() => throttle(20, scrollPreviewHandler), [scrollPreviewHandler]);
+  const scrollPreviewHandlerThrottle = useMemo(() => throttle(150, scrollPreviewHandler), [scrollPreviewHandler]);
 
   const afterResolvedHandler = useCallback(async() => {
     // get page data from db