Skip to content

Commit 520e4cb

Browse files
committed
fix: 🐛 cursor listen scrollLeft change
1 parent a0f6e54 commit 520e4cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/cursor/cursor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const Cursor: FC<CursorProps> = ({
4646
// 非dragging时,根据穿参更新cursor刻度
4747
rowRnd.current.updateLeft(parserTimeToPixel(cursorTime, { startLeft, scaleWidth, scale }) - scrollLeft);
4848
}
49-
}, [cursorTime, startLeft, scaleWidth, scale]);
49+
}, [cursorTime, startLeft, scaleWidth, scale, scrollLeft]);
5050

5151
useEffect(() => {
5252
if (areaRef.current) {

0 commit comments

Comments
 (0)