Added touch supprt to fog polygon
This commit is contained in:
parent
2f740efd7c
commit
cb8b66e55f
@ -192,14 +192,14 @@ function MapFog({
|
|||||||
setIsBrushDown(false);
|
setIsBrushDown(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
mapStage.on("mousedown", handleBrushDown);
|
mapStage.on("mousedown touchstart", handleBrushDown);
|
||||||
mapStage.on("mousemove", handleBrushMove);
|
mapStage.on("mousemove touchmove", handleBrushMove);
|
||||||
mapStage.on("mouseup", handleBrushUp);
|
mapStage.on("mouseup touchend", handleBrushUp);
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
mapStage.off("mousedown", handleBrushDown);
|
mapStage.off("mousedown touchstart", handleBrushDown);
|
||||||
mapStage.off("mousemove", handleBrushMove);
|
mapStage.off("mousemove touchmove", handleBrushMove);
|
||||||
mapStage.off("mouseup", handleBrushUp);
|
mapStage.off("mouseup touchend", handleBrushUp);
|
||||||
};
|
};
|
||||||
}, [
|
}, [
|
||||||
mapStageRef,
|
mapStageRef,
|
||||||
|
@ -124,6 +124,7 @@ export function Tick({ x, y, scale, onClick, cross }) {
|
|||||||
onMouseEnter={handleEnter}
|
onMouseEnter={handleEnter}
|
||||||
onMouseLeave={handleLeave}
|
onMouseLeave={handleLeave}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
|
onTap={onClick}
|
||||||
>
|
>
|
||||||
<Circle radius={12} fill="hsla(230, 25%, 18%, 0.8)" />
|
<Circle radius={12} fill="hsla(230, 25%, 18%, 0.8)" />
|
||||||
<Path
|
<Path
|
||||||
|
Loading…
Reference in New Issue
Block a user