Skip to content

Interface: InfiniteCanvas

This interface contains properties that determine the behavior of the InfiniteCanvas.

Hierarchy

Properties

greedyGestureHandling

greedyGestureHandling: boolean

If true, this means that the InfiniteCanvas will pan when touched with one finger, and that it will zoom when the user scrolls without pressing the Ctrl key

Default Value

ts
false

Inherited from

Config.greedyGestureHandling

Defined in

config.ts:18


inverseTransformation

Readonly inverseTransformation: TransformationRepresentation

The inverse of transformation

Inherited from

Transformed.inverseTransformation

Defined in

transformed.ts:11


ondraw

ondraw: (this: InfiniteCanvas, event: TransformationEvent) => any

The event handler property for the EventMap.draw event

Type declaration

▸ (this, event): any

Parameters
NameType
thisInfiniteCanvas
eventTransformationEvent
Returns

any

Inherited from

InfiniteCanvasEventHandlers.ondraw

Defined in

infinite-canvas.ts:24


ontouchignored

ontouchignored: (this: InfiniteCanvas, event: Event) => any

The event handler property for the EventMap.touchignored event

Type declaration

▸ (this, event): any

Parameters
NameType
thisInfiniteCanvas
eventEvent
Returns

any

Inherited from

InfiniteCanvasEventHandlers.ontouchignored

Defined in

infinite-canvas.ts:32


ontransformationchange

ontransformationchange: (this: InfiniteCanvas, event: TransformationEvent) => any

The event handler property for the EventMap.transformationchange event

Type declaration

▸ (this, event): any

Parameters
NameType
thisInfiniteCanvas
eventTransformationEvent
Returns

any

Inherited from

InfiniteCanvasEventHandlers.ontransformationchange

Defined in

infinite-canvas.ts:16


ontransformationend

ontransformationend: (this: InfiniteCanvas, event: TransformationEvent) => any

The event handler property for the EventMap.transformationend event

Type declaration

▸ (this, event): any

Parameters
NameType
thisInfiniteCanvas
eventTransformationEvent
Returns

any

Inherited from

InfiniteCanvasEventHandlers.ontransformationend

Defined in

infinite-canvas.ts:20


ontransformationstart

ontransformationstart: (this: InfiniteCanvas, event: TransformationEvent) => any

The event handler property for the EventMap.transformationstart event

Type declaration

▸ (this, event): any

Parameters
NameType
thisInfiniteCanvas
eventTransformationEvent
Returns

any

Inherited from

InfiniteCanvasEventHandlers.ontransformationstart

Defined in

infinite-canvas.ts:12


onwheelignored

onwheelignored: (this: InfiniteCanvas, event: Event) => any

The event handler property for the EventMap.wheelignored event

Type declaration

▸ (this, event): any

Parameters
NameType
thisInfiniteCanvas
eventEvent
Returns

any

Inherited from

InfiniteCanvasEventHandlers.onwheelignored

Defined in

infinite-canvas.ts:28


rotationEnabled

rotationEnabled: boolean

Determines whether rotating the InfiniteCanvas is possible or not

Default Value

ts
true

Inherited from

Config.rotationEnabled

Defined in

config.ts:12


transformation

Readonly transformation: TransformationRepresentation

The transformation that, when applied to a point (x, y) in the CSS-pixel-base coordinate system of the <canvas> (which has its origin at the top-left corner of the canvas), returns the corresponding point in the InfiniteCanvas's coordinate system

Inherited from

Transformed.transformation

Defined in

transformed.ts:7


units

units: Units

Determines the units to use when drawing on an InfiniteCanvas

Default Value

ts
{@link Units.CANVAS}

Inherited from

Config.units

Defined in

config.ts:24

Methods

addEventListener

addEventListener<K>(type, listener, options?): void

See addEventListener

Type parameters

NameType
Kextends keyof EventMap

Parameters

NameType
typeK
listener(this: InfiniteCanvas, ev: EventMap[K]) => any
options?boolean | AddEventListenerOptions

Returns

void

Inherited from

InfiniteCanvasEventHandlers.addEventListener

Defined in

infinite-canvas.ts:36

addEventListener(type, listener, options?): void

Parameters

NameType
typestring
listenerEventListenerOrEventListenerObject
options?boolean | AddEventListenerOptions

Returns

void

Inherited from

InfiniteCanvasEventHandlers.addEventListener

Defined in

infinite-canvas.ts:37


getContext

getContext(contextType?): InfiniteCanvasRenderingContext2D

This methods return the InfiniteCanvasRenderingContext2D belonging to this instance of InfiniteCanvas

Parameters

NameTypeDescription
contextType?"2d"for (partial) compatibility with the other getContext()

Returns

InfiniteCanvasRenderingContext2D

Defined in

infinite-canvas.ts:51


removeEventListener

removeEventListener<K>(type, listener, options?): void

See removeEventListener

Type parameters

NameType
Kextends keyof EventMap

Parameters

NameType
typeK
listener(this: InfiniteCanvas, ev: EventMap[K]) => any
options?boolean | EventListenerOptions

Returns

void

Inherited from

InfiniteCanvasEventHandlers.removeEventListener

Defined in

infinite-canvas.ts:41

removeEventListener(type, listener, options?): void

Parameters

NameType
typestring
listenerEventListenerOrEventListenerObject
options?boolean | EventListenerOptions

Returns

void

Inherited from

InfiniteCanvasEventHandlers.removeEventListener

Defined in

infinite-canvas.ts:42