fix: change default cursor on canvas to crosshair

This commit is contained in:
trafficlunar 2025-01-10 20:03:58 +00:00
parent 46648d92da
commit 9e534ac92c
2 changed files with 3 additions and 3 deletions

View file

@ -84,7 +84,7 @@ function Canvas() {
zoom: holdingAlt ? "zoom-out" : "zoom-in", zoom: holdingAlt ? "zoom-out" : "zoom-in",
}; };
setCssCursor(cursorMapping[tool] || "pointer"); setCssCursor(cursorMapping[tool] || "crosshair");
}, [dragging, holdingAlt, tool, setCssCursor]); }, [dragging, holdingAlt, tool, setCssCursor]);
const onToolUse = useCallback(() => { const onToolUse = useCallback(() => {

View file

@ -21,7 +21,7 @@ export const ToolProvider = ({ children }: Props) => {
const [tool, setTool] = useState<Tool>("hand"); const [tool, setTool] = useState<Tool>("hand");
const [radius, setRadius] = useState(1); const [radius, setRadius] = useState(1);
const [selectedBlock, setSelectedBlock] = useState("stone"); const [selectedBlock, setSelectedBlock] = useState("stone");
const [cssCursor, setCssCursor] = useState("pointer"); const [cssCursor, setCssCursor] = useState("crosshair");
useEffect(() => { useEffect(() => {
switch (tool) { switch (tool) {
@ -33,7 +33,7 @@ export const ToolProvider = ({ children }: Props) => {
break; break;
default: default:
setCssCursor("pointer"); setCssCursor("crosshair");
break; break;
} }
}, [tool]); }, [tool]);