Skip to content

@shbernal/pptxgenjs


@shbernal/pptxgenjs / index / ConnectorProps

Interface: ConnectorProps

Defined in: core-interfaces.ts:438

A connector is a line drawn between two points, emitted as a PowerPoint connector (<p:cxnSp>) so the app treats it as a connector (selectable/reroutable) rather than a plain line shape. Endpoints are given directly; the bounding box and flip flags are derived.

Properties

adj?

optional adj?: number | number[]

Defined in: core-interfaces.ts:464

Bend position(s) as a percent of the connector box (0100), one value per bend. A single number sets the sole jog of a one-bend elbow / curved; an array sets each jog of a multi-bend connector and its length must equal bends. Values outside 0100 are allowed (they place the bend beyond the endpoint box, as PowerPoint itself does when endpoints flip). When omitted, PowerPoint uses the preset default (50%).

Emitted as <a:gd name="adj1…" fmla="val …"/> adjust guides (OOXML 1000ths-of-a-percent).


altText?

optional altText?: string

Defined in: core-interfaces.ts:513

Accessibility alt text


beginArrowType?

optional beginArrowType?: "none" | "triangle" | "arrow" | "diamond" | "oval" | "stealth"

Defined in: core-interfaces.ts:507

Arrowhead at the start point


bends?

optional bends?: 1 | 2 | 3

Defined in: core-interfaces.ts:454

Number of adjustable bends (jogs) for an elbow / curved connector. Selects the preset variant and how many adj values it accepts:

  • 1bentConnector3 / curvedConnector3 (one jog) — the default
  • 2bentConnector4 / curvedConnector4 (two jogs)
  • 3bentConnector5 / curvedConnector5 (three jogs)

Ignored for type: 'straight' (a straight connector has no bends).

Default

ts
1

color?

optional color?: string

Defined in: core-interfaces.ts:498

Line color (6-digit hex, no #)

Default

ts
'000000'

dashType?

optional dashType?: "dash" | "solid" | "dashDot" | "lgDash" | "lgDashDot" | "lgDashDotDot" | "sysDash" | "sysDot"

Defined in: core-interfaces.ts:505

Dash style


endArrowType?

optional endArrowType?: "none" | "triangle" | "arrow" | "diamond" | "oval" | "stealth"

Defined in: core-interfaces.ts:509

Arrowhead at the end point


endShape?

optional endShape?: string

Defined in: core-interfaces.ts:480

Bind the connector's end point to a shape on the same slide (by objectName). Emits <a:endCxn>. See startShape.


endShapeIdx?

optional endShapeIdx?: number

Defined in: core-interfaces.ts:485

Connection-site index on endShape. Ignored without endShape.

Default

ts
0

objectName?

optional objectName?: string

Defined in: core-interfaces.ts:511

Selection Pane object name


startShape?

optional startShape?: string

Defined in: core-interfaces.ts:472

Bind the connector's start point to a shape on the same slide, referenced by that shape's objectName. Emits <a:stCxn id=… idx=…>, so PowerPoint treats the endpoint as attached: it reroutes when the shape moves and its elbow auto-router can engage. The shape's objectName must be set and unique on the slide. x1/y1 remain the static fallback geometry (and are used if the name can't be resolved).


startShapeIdx?

optional startShapeIdx?: number

Defined in: core-interfaces.ts:478

Connection-site index on startShape (0-based; the valid range is preset-dependent — a shape's <a:cxnLst> enumerates its sites). Ignored without startShape.

Default

ts
0

type?

optional type?: ConnectorType

Defined in: core-interfaces.ts:443

Routing style

Default

ts
'straight'

width?

optional width?: number

Defined in: core-interfaces.ts:503

Line width (pt)

Default

ts
1

x1

x1: Coord

Defined in: core-interfaces.ts:487

Start point X — inches, or a Coord such as '50%' / '2in'


x2

x2: Coord

Defined in: core-interfaces.ts:491

End point X


y1

y1: Coord

Defined in: core-interfaces.ts:489

Start point Y


y2

y2: Coord

Defined in: core-interfaces.ts:493

End point Y