Board kit command
connector.bind
Attach connector end
Moves one end of an existing connector onto an element (at an anchor on its box) or to a free point.
- Kit
- Board 0.1.0 (.kboard)
- Changes the document
- yes
- Acts on
id(one id), which a run step’sonfills
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | The connector |
terminal | "start" | "end" | yes | Which end |
to | object | yes | Where the end goes: { element, anchor? } to attach to an element (anchor [0..1, 0..1] on its box, the nearest edge when absent), or { point: [x, y] } |
Call through board_run
text
board_run {
"path": "<file>.kboard",
"steps": [{ "command": "connector.bind", "params": { "id": <string>, "terminal": <"start" | "end">, "to": <object> } }]
}The required parameters, with placeholders for their types: not a tested example. 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"
]
},
"terminal": {
"description": "Which end",
"enum": [
"start",
"end"
],
"type": "string"
},
"to": {
"additionalProperties": false,
"description": "Where the end goes: { element, anchor? } to attach to an element (anchor [0..1, 0..1] on its box, the nearest edge when absent), or { point: [x, y] }",
"properties": {
"anchor": {
"description": "[x, y] on the element's box, clamped to 0 to 1",
"oneOf": [
{
"items": {
"description": "One component",
"maximum": 1000000,
"minimum": -1000000,
"type": "number"
},
"type": "array"
},
{
"additionalProperties": false,
"properties": {
"x": {
"description": "One component",
"maximum": 1000000,
"minimum": -1000000,
"type": "number"
},
"y": {
"description": "One component",
"maximum": 1000000,
"minimum": -1000000,
"type": "number"
}
},
"required": [
"x",
"y"
],
"type": "object"
}
]
},
"element": {
"description": "The element to attach to",
"type": "string",
"x-khp-role": "object",
"x-khp-types": [
"Element"
]
},
"point": {
"description": "A free end at [x, y]",
"oneOf": [
{
"items": {
"description": "One component",
"maximum": 1000000,
"minimum": -1000000,
"type": "number"
},
"type": "array"
},
{
"additionalProperties": false,
"properties": {
"x": {
"description": "One component",
"maximum": 1000000,
"minimum": -1000000,
"type": "number"
},
"y": {
"description": "One component",
"maximum": 1000000,
"minimum": -1000000,
"type": "number"
}
},
"required": [
"x",
"y"
],
"type": "object"
}
]
}
},
"type": "object"
}
},
"required": [
"id",
"terminal",
"to"
],
"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.