Skip to content

Feature: restrict the visible map to the conflict area when a Focus is set #97

Description

@fank

Feature request

Problem

The Focus feature currently trims the timeline to a time range (in/out frames), but the map still shows the entire world — including both teams' preparation and setup phases staged far from the actual engagement. During review this is noisy: you watch units maneuvering off-area while the fight you care about is happening elsewhere.

The idea: give a Focus an optional area (conflict zone) so that only the conflict area is visible while that focus is active.

Desired behavior

When a Focus with an area is active:

  • The timeline is already trimmed to the focus range (existing behavior — this "cuts off preparation" in time and jumps you toward the action start).
  • Units/events whose position at the current frame is outside the area are hidden — only the units involved in the conflict render. Both teams' off-area preparation disappears from the map.

Proposed UX

  • A "Set area to current view" action, parallel to the existing "set in-point / out-point to playhead" controls — captures the current map viewport as the conflict area. This keeps it symmetrical with how Focus already works (no new drawing surface required).
  • A way to clear the area back to showing everything.

Alternatives considered

  • Full polygon-drawing editor + server-side action statistics — much more powerful, but a large scope and more than this playback-visibility need requires.
  • Camera clamp only (auto-pan/lock the view, keep all units) — doesn't satisfy "preparation of both teams cut off", since off-area units would still be visible.

Implementation sketch

  • Small pointInPolygon utility.
  • Optional focusArea on a recording's focus metadata (parallel to focusStart/focusEnd).
  • In the Leaflet renderer, hide any entity whose position at the current frame is outside the active area, reusing the existing per-frame visibility path already used by the name-display modes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions