Skip to content

Class: FlatMapViewAttachment ​

Defined in: flatmap/FlatMapViewAttachment.ts:9

A view attachment borrows its controller/renderer; detach does not dispose shared resources.

Constructors ​

Constructor ​

ts
new FlatMapViewAttachment(
   view, 
   controller, 
   renderer
): FlatMapViewAttachment;

Defined in: flatmap/FlatMapViewAttachment.ts:13

Parameters ​

view ​

FlatMapView

controller ​

FlatMapController

renderer ​

FlatMapRenderer

Returns ​

FlatMapViewAttachment

Properties ​

view ​

ts
readonly view: FlatMapView;

Defined in: flatmap/FlatMapViewAttachment.ts:13


controller ​

ts
readonly controller: FlatMapController;

Defined in: flatmap/FlatMapViewAttachment.ts:13


renderer ​

ts
readonly renderer: FlatMapRenderer;

Defined in: flatmap/FlatMapViewAttachment.ts:13

Methods ​

prepare() ​

ts
prepare(width?, height?): Promise<void>;

Defined in: flatmap/FlatMapViewAttachment.ts:22

Parameters ​

width? ​

number = 512

height? ​

number

Returns ​

Promise<void>


paint() ​

ts
paint(context): void;

Defined in: flatmap/FlatMapViewAttachment.ts:37

Parameters ​

context ​

CanvasRenderingContext2D

Returns ​

void


paintSelection() ​

ts
paintSelection(
   context, 
   color, 
   radius
): void;

Defined in: flatmap/FlatMapViewAttachment.ts:43

Parameters ​

context ​

CanvasRenderingContext2D

color ​

string

radius ​

number

Returns ​

void


hit() ​

ts
hit(x, y): FlatMapHit | null;

Defined in: flatmap/FlatMapViewAttachment.ts:50

Parameters ​

x ​

number

y ​

number

Returns ​

FlatMapHit | null


pickVertex() ​

ts
pickVertex(x, y): number | null;

Defined in: flatmap/FlatMapViewAttachment.ts:51

Parameters ​

x ​

number

y ​

number

Returns ​

number | null


selectAt() ​

ts
selectAt(x, y): void;

Defined in: flatmap/FlatMapViewAttachment.ts:56

Parameters ​

x ​

number

y ​

number

Returns ​

void


dispose() ​

ts
dispose(): void;

Defined in: flatmap/FlatMapViewAttachment.ts:57

Returns ​

void

Released under the MIT License.