Skip to content

Commit 7077c39

Browse files
committed
fix: map cursor not set when dragging
1 parent 2737956 commit 7077c39

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/map.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ export function Map(initial: MapProps) {
8080
);
8181
createEffect(() => {
8282
const canvas = map()?.getCanvas();
83-
if (canvas) canvas.style.cursor = (props.cursor ?? interactive()) ? "grab" : "auto";
83+
if (canvas && interactive()) {
84+
canvas.style.cursor = props.cursor ?? "unset";
85+
}
8486
});
8587

8688
createEffect(() => {

0 commit comments

Comments
 (0)