fix: change default cursor on canvas to crosshair
This commit is contained in:
parent
46648d92da
commit
9e534ac92c
2 changed files with 3 additions and 3 deletions
|
|
@ -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(() => {
|
||||||
|
|
|
||||||
|
|
@ -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]);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue