Open hzl9900 opened 1 year ago
目录(TOC)目前是支持滚动的,如果有问题,最好提供一下截图以及详细信息。
应该是ff的问题 Firefox
Edge
it doesn't work on IOS (scrolling), here's the solution, you need to change useDisablePinchZooming.ts like this:
import { useEffect } from 'react'
// https://github.com/excalidraw/excalidraw/blob/7eaf47c9d41a33a6230d8c3a16b5087fc720dcfb/src/packages/excalidraw/index.tsx#L66
export function useDisablePinchZooming(win?: Window) {
useEffect(() => {
const _win = win ?? window
// Block pinch-zooming on iOS outside of the content area
const handleTouchMove = (event: TouchEvent) => {
if (event.touches.length > 1) {
event.preventDefault()
}
}
_win.document.addEventListener('touchmove', handleTouchMove, {
passive: false,
})
return () => {
_win.document.removeEventListener('touchmove', handleTouchMove)
}
}, [win])
}
目录项太多的时候,显示不完