targets_set

Replaces the viewport's host targets whole: ports anchored to 2D shapes ({ key, kind: 'port', nodeId, portId, side: 'in' | 'out', bind: { shape, anchor }, radiusPx }), tested like the kit's own targets and owned by the resident wire tool. A drag between an out and an in port commits connect; one released elsewhere cancels with 'no-target' and asks for quick-add.

Command

Usage

TypeScript
surface.execute('targets_set', { viewport, targets })

Parameters

  • viewportstring

    the host's viewport id; default: the engine's first viewport

    Required

  • targetsobject[]

    Required

Returns

object, in the ok: true envelope.

JSON
{
  "type": "object",
  "properties": {}
}

See also