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
import { FakeMapHost } from "@mapcairn/core";
class FakeMapHost implements MapHostElement
Constructors
(constructor)
constructor(
width?: number,
height?: number);
Constructs a new instance of the FakeMapHost class
width?(number)height?(number)
Properties
focusCalls
readonly focusCalls: ({
preventScroll?: boolean;
} | undefined)[];
The options of every focus call, in order.
height
readonly height: number;
The height in pixels that getBoundingClientRect reports.
width
readonly width: number;
The width in pixels that getBoundingClientRect reports.
Methods
focus
focus(options?: {
preventScroll?: boolean;
}): void;
Records the call in focusCalls.
options?({ preventScroll?: boolean; })
getBoundingClientRect
getBoundingClientRect(): {
readonly width: number;
readonly height: number;
readonly left: number;
readonly top: number;
};
The fixed width and height, with left and top of 0.