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