* scroll minimap to keep it in view

* remove console log

* change ref

* rebase to dev

* rebase to dev

* rebase to dev

* fix history flexbox and live extra scrollbar

* remove extra class
This commit is contained in:
Josh Hawkins
2024-02-22 21:15:50 -06:00
committed by GitHub
parent f84d2db406
commit a6aa5328aa
5 changed files with 204 additions and 139 deletions

View File

@@ -1,4 +1,4 @@
import { useCallback } from "react";
import { useCallback, useEffect } from "react";
interface DragHandlerProps {
contentRef: React.RefObject<HTMLElement>;
@@ -128,6 +128,17 @@ function useDraggableHandler({
]
);
useEffect(() => {
// TODO: determine when we want to do this
const handlebar = scrollTimeRef.current;
if (handlebar && showHandlebar) {
// handlebar.scrollIntoView({
// behavior: "smooth",
// block: "center",
// });
}
}, []);
return { handleMouseDown, handleMouseUp, handleMouseMove };
}