# FakeMapHost

A host element double of a fixed size, recording focus calls.

This is a class exported by `@mapcairn/core`, checked against version 0.2.0.

## Signature

```ts
import { FakeMapHost } from "@mapcairn/core";
 
class FakeMapHost implements MapHostElement
```

## Constructors

### (constructor)

```ts
constructor(
    width?: number, 
    height?: number);
```

Constructs a new instance of the `FakeMapHost` class

- `width?` (`number`)
- `height?` (`number`)

## Properties

### focusCalls

```ts
readonly focusCalls: ({
        preventScroll?: boolean;
    } | undefined)[];
```

The options of every `focus` call, in order.

### height

```ts
readonly height: number;
```

The height in pixels that `getBoundingClientRect` reports.

### width

```ts
readonly width: number;
```

The width in pixels that `getBoundingClientRect` reports.

## Methods

### focus

```ts
focus(options?: {
        preventScroll?: boolean;
    }): void;
```

Records the call in `focusCalls`.

- `options?` (`{
        preventScroll?: boolean;
    }`)

### getBoundingClientRect

```ts
getBoundingClientRect(): {
        readonly width: number;
        readonly height: number;
        readonly left: number;
        readonly top: number;
    };
```

The fixed width and height, with `left` and `top` of 0.

## See also

- [`MapHostElement`](https://docs.mapcairn.com/api/core/MapHostElement.md)

Source: [packages/core/src/fakes/FakeMapAdapter.ts:65](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/fakes/FakeMapAdapter.ts#L65)
