resetMapSelection method

Future<void> resetMapSelection()

Resets the cursor to its default position at the viewport center.

Sets the cursor screen position to the center of the current viewport, clearing any previous cursor placement. This restores the default state where map centering operations target the viewport center.

This asynchronous method must be awaited to ensure the cursor update completes before subsequent operations.

See also:

Implementation

Future<void> resetMapSelection() async {
  await setCursorScreenPosition(
    Point<int>((viewport.width / 2).round(), (viewport.height / 2).round()),
  );
}