Skip to content

Commit edaea40

Browse files
authored
Merge pull request #34 from evillollive/copilot/fix-remove-button-token-section
Fix Remove token button in player view
2 parents bb6701d + 1410aff commit edaea40

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎src/components/MapCanvas.tsx‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,8 +580,11 @@ const MapCanvas = forwardRef<MapCanvasHandle, MapCanvasProps>(({
580580
onAddToken(kind, px, py, undefined, size);
581581
} else if (activeTool === 'remove-token') {
582582
const t = findTokenAt(tokens, x + 0.5, y + 0.5);
583-
// Players may only remove player-kind tokens. NPCs/monsters are GM-managed.
584-
if (t && t.kind === 'player') onRemoveToken(t.id);
583+
// The Remove Token tool can delete any token kind, mirroring the
584+
// Move Token tool — token management lives entirely in the player
585+
// toolbar, so restricting removal to player-kind tokens would leave
586+
// NPC/monster tokens stranded with no way to clean them up.
587+
if (t) onRemoveToken(t.id);
585588
} else if (activeTool === 'perase') {
586589
// Click a stroke's bounding cell to remove it. Only player strokes
587590
// are removable from the player view.

0 commit comments

Comments
 (0)