Board kit command

connector.setLabel

Connector label

Sets or removes a connector's label and where along the route it sits (0 to 1).

Kit
Board 0.1.0 (.kboard)
Changes the document
yes
Acts on
id (one id), which a run step’s on fills

Parameters

Parameters of connector.setLabel
NameTypeRequiredDescription
idstringyesThe connector
positionnumber (≥ 0, ≤ 1)noWhere along the route, 0 to 1 (0.5 by default)
textstringyesThe label; empty removes it

Call through board_run

text
board_run {
  "path": "<file>.kboard",
  "steps": [{ "command": "connector.setLabel", "params": { "id": <string>, "text": <string> } }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: position. board_run answers the step’s result in completed[i].result.

Result

The kit gives no result schema for this command.

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "id": {
      "description": "The connector",
      "type": "string",
      "x-khp-types": [
        "Element"
      ]
    },
    "position": {
      "description": "Where along the route, 0 to 1 (0.5 by default)",
      "maximum": 1,
      "minimum": 0,
      "type": "number"
    },
    "text": {
      "description": "The label; empty removes it",
      "type": "string"
    }
  },
  "required": [
    "id",
    "text"
  ],
  "type": "object"
}

Generated from the command list of @kition/[email protected] and the kit itself (board_commands through @kition/[email protected], built from KitionAI/kition-board@e78c190). As data: commands.jsonl.