Added tap events for map interaction
This commit is contained in:
parent
5f2d282df8
commit
a91f2c6d39
@ -191,6 +191,7 @@ function MapDrawing({
|
|||||||
onMouseOver: (e) => handleShapeMouseOver(e, shape),
|
onMouseOver: (e) => handleShapeMouseOver(e, shape),
|
||||||
onMouseOut: (e) => handleShapeMouseOut(e, shape),
|
onMouseOut: (e) => handleShapeMouseOut(e, shape),
|
||||||
onClick: (e) => handleShapeClick(e, shape),
|
onClick: (e) => handleShapeClick(e, shape),
|
||||||
|
onTap: (e) => handleShapeClick(e, shape),
|
||||||
fill: colors[shape.color] || shape.color,
|
fill: colors[shape.color] || shape.color,
|
||||||
opacity: shape.blend ? 0.5 : 1,
|
opacity: shape.blend ? 0.5 : 1,
|
||||||
};
|
};
|
||||||
|
@ -187,6 +187,7 @@ function MapFog({
|
|||||||
onMouseOver={(e) => handleShapeMouseOver(e, shape)}
|
onMouseOver={(e) => handleShapeMouseOver(e, shape)}
|
||||||
onMouseOut={(e) => handleShapeMouseOut(e, shape)}
|
onMouseOut={(e) => handleShapeMouseOut(e, shape)}
|
||||||
onClick={(e) => handleShapeClick(e, shape)}
|
onClick={(e) => handleShapeClick(e, shape)}
|
||||||
|
onTap={(e) => handleShapeClick(e, shape)}
|
||||||
points={shape.data.points.reduce(
|
points={shape.data.points.reduce(
|
||||||
(acc, point) => [...acc, point.x * mapWidth, point.y * mapHeight],
|
(acc, point) => [...acc, point.x * mapWidth, point.y * mapHeight],
|
||||||
[]
|
[]
|
||||||
|
@ -205,6 +205,7 @@ function MapToken({
|
|||||||
onTouchStart={handlePointerDown}
|
onTouchStart={handlePointerDown}
|
||||||
onTouchEnd={handlePointerUp}
|
onTouchEnd={handlePointerUp}
|
||||||
onClick={handleClick}
|
onClick={handleClick}
|
||||||
|
onTap={handleClick}
|
||||||
onDragEnd={handleDragEnd}
|
onDragEnd={handleDragEnd}
|
||||||
onDragStart={handleDragStart}
|
onDragStart={handleDragStart}
|
||||||
opacity={tokenOpacity}
|
opacity={tokenOpacity}
|
||||||
|
Loading…
Reference in New Issue
Block a user