Skip to content

base-socket-position

Classes

abstract BaseSocketPosition<Schemes, K>

Abstract class for socket position calculation. It can be extended to implement custom socket position calculation.

Listens

render

Listens

rendered

Listens

unmount

Listens

nodetranslated

Listens

noderesized

Extended by

Type Parameters

Schemes extends BaseSchemes

K

Implements

  • SocketPositionWatcher<Scope<never, [K]>>

Constructors

new BaseSocketPosition()
new BaseSocketPosition<Schemes, K>(): BaseSocketPosition<Schemes, K>
Returns

BaseSocketPosition<Schemes, K>

Properties

area
area: null | BaseAreaPlugin<Schemes, ExpectArea2DExtra<Schemes>> = null;
Defined in

tmp/graph-editor/src/lib/graph-editor/render/sockets-position.ts/base-socket-position.ts:31

emitter
emitter: EventEmitter<ListenerData>;
Defined in

tmp/graph-editor/src/lib/graph-editor/render/sockets-position.ts/base-socket-position.ts:30

sockets
sockets: SocketsPositionsStorage;
Defined in

tmp/graph-editor/src/lib/graph-editor/render/sockets-position.ts/base-socket-position.ts:29

Methods

attach()
attach(scope): void

Attach the watcher to the area’s child scope.

Parameters

scope: Scope<never, [K]>

Scope of the watcher that should be a child of BaseAreaPlugin

Returns

void

Implementation of

SocketPositionWatcher.attach

Defined in

tmp/graph-editor/src/lib/graph-editor/render/sockets-position.ts/base-socket-position.ts:51

calculatePosition()
abstract calculatePosition(
nodeId,
side,
key,
element): Promise<null | Position>

The method needs to be implemented that calculates the position of the socket.

Parameters

nodeId: string

Node ID

side: Side

Side of the socket, ‘input’ or ‘output’

key: string

Socket key

element: HTMLElement

Socket element

Returns

Promise<null | Position>

Defined in

tmp/graph-editor/src/lib/graph-editor/render/sockets-position.ts/base-socket-position.ts:40