# UseLongPress

The pointer handlers to spread on the host, plus hooks for the map engine.

This is an interface exported by `@mapcairn/map`, checked against version 0.2.0.

## Signature

```ts
import type { UseLongPress } from "@mapcairn/map";
 
interface UseLongPress
```

## Properties

### cancel

```ts
readonly cancel: () => void;
```

Cancels a pending press. Call it when the map moves.

### consumeClick

```ts
readonly consumeClick: () => boolean;
```

Returns true, once, for the engine click that follows a long-press, so the
caller can drop it. A new press clears the flag, so a missing engine click
never swallows a later one.

### handlers

```ts
readonly handlers: {
        readonly onPointerDown: (event: PointerEvent_2) => void;
        readonly onPointerMove: (event: PointerEvent_2) => void;
        readonly onPointerUp: (event: PointerEvent_2) => void;
        readonly onPointerCancel: (event: PointerEvent_2) => void;
        readonly onContextMenu: (event: MouseEvent_2) => void;
    };
```

The pointer and context-menu handlers to spread on the map host element.

Source: [packages/map/src/host/useLongPress.ts:39](https://github.com/MapCairn/mapcairn/blob/main/packages/map/src/host/useLongPress.ts#L39)
