This is what I am seeing from a full API dump of a label attached to a line – could be missing something, but I can’t see any property encoding that relationship to the line:
omniJS property dictionary of a line label
{
"id": 27,
"type": "Shape",
"actionURL": null,
"alignsEdgesToGrid": true,
"allowsConnections": true,
"automationAction": [],
"autosizing": "TextAutosizing.Full",
"blendColor": null,
"blendFraction": 0,
"connectedLines": [],
"cornerRadius": 0,
"fillColor": {
"r": 1,
"g": 1,
"b": 1,
"a": 1
},
"fillType": "FillType.Solid",
"flippedHorizontally": false,
"flippedVertically": false,
"fontName": "HelveticaNeue",
"geometry": {
"x": -106.36727182239987,
"y": -193.3825628085692,
"width": 85,
"height": 30
},
"gradientAngle": 90,
"gradientCenter": {
"x": 0,
"y": 0
},
"gradientColor": {
"r": 0.20000000298023224,
"g": 0.20000000298023224,
"b": 0.20000000298023224,
"a": 1
},
"image": null,
"imageOffset": {
"x": 0,
"y": 0
},
"imageOpacity": 0,
"imagePage": 0,
"imageSizing": "ImageSizing.Manual",
"incomingLines": [],
"layer": "Layer 1",
"locked": false,
"magnets": [],
"name": null,
"notes": "",
"outgoingLines": [],
"plasticCurve": null,
"plasticHighlightAngle": null,
"rotation": 0,
"shadowColor": null,
"shadowFuzziness": 3,
"shadowVector": {
"x": 0,
"y": 2
},
"shape": "Rectangle",
"shapeControlPoints": [
{
"x": -106.36727182239989,
"y": -193.3825628085692
},
{
"x": -106.36727182239989,
"y": -193.3825628085692
},
{
"x": -21.36727182239988,
"y": -193.3825628085692
},
{
"x": -21.36727182239988,
"y": -193.3825628085692
},
{
"x": -21.36727182239988,
"y": -193.3825628085692
},
{
"x": -21.36727182239988,
"y": -163.3825628085692
},
{
"x": -21.36727182239988,
"y": -163.3825628085692
},
{
"x": -21.36727182239988,
"y": -163.3825628085692
},
{
"x": -106.36727182239989,
"y": -163.3825628085692
},
{
"x": -106.36727182239989,
"y": -163.3825628085692
},
{
"x": -106.36727182239989,
"y": -163.3825628085692
},
{
"x": -106.36727182239989,
"y": -193.3825628085692
}
],
"shapeVertices": [
{
"x": -106.36727182239989,
"y": -193.3825628085692
},
{
"x": -21.36727182239988,
"y": -193.3825628085692
},
{
"x": -21.36727182239988,
"y": -163.3825628085692
},
{
"x": -106.36727182239989,
"y": -163.3825628085692
}
],
"strokeCap": "LineCap.Round",
"strokeColor": null,
"strokeJoin": "LineJoin.Round",
"strokePattern": "StrokeDash.Solid",
"strokeThickness": 1,
"strokeType": null,
"text": "Label here",
"textColor": {
"r": 0,
"g": 0,
"b": 0,
"a": 1
},
"textGeometry": {
"x": -106.21127182239987,
"y": -191.8305608554442,
"width": 84.68799999999999,
"height": 28.447998046875
},
"textHorizontalAlignment": "HorizontalTextAlignment.Center",
"textHorizontalPadding": 5,
"textRotation": 0,
"textRotationIsRelative": true,
"textSize": 16,
"textUnitRect": {
"x": 0,
"y": 0,
"width": 1,
"height": 1
},
"textVerticalPadding": 5,
"textVerticalPlacement": "VerticalTextPlacement.Middle",
"textWraps": false,
"tripleBlend": false,
"userData": {}
}
```[/details]
[details=omniJS properties of line to which label is attached]```JavaScript
{
"id": 4,
"type": "Line",
"actionURL": null,
"alignsEdgesToGrid": true,
"allowsConnections": true,
"automationAction": [],
"bezierPoints": [],
"connectedLines": [],
"cornerRadius": 0,
"flippedHorizontally": false,
"flippedVertically": false,
"geometry": {
"x": -189.92118503021285,
"y": -205.5116406833829,
"width": 218.7637814307776,
"height": 64.01540393036822
},
"head": 5,
"headMagnet": 0,
"headScale": 1,
"headType": "FilledArrow",
"hopType": "HopType.None",
"incomingLines": [],
"layer": "Layer 1",
"lineType": "LineType.Straight",
"locked": false,
"name": null,
"notes": "",
"outgoingLines": [],
"plasticCurve": null,
"plasticHighlightAngle": null,
"points": [
{
"x": 28.842596400564773,
"y": -205.5116406833829
},
{
"x": -189.92118503021285,
"y": -141.49623675301467
}
],
"rotation": 0,
"shadowColor": null,
"shadowFuzziness": 3,
"shadowVector": {
"x": 0,
"y": 2
},
"strokeCap": "LineCap.Round",
"strokeColor": {
"r": 1,
"g": 0.149131,
"b": 0,
"a": 1
},
"strokeJoin": "LineJoin.Round",
"strokePattern": "StrokeDash.Solid",
"strokeThickness": 2,
"strokeType": "StrokeType.Single",
"tail": 3,
"tailMagnet": 0,
"tailScale": 1,
"tailType": "",
"userData": {}
}
```[/details]
For contrast - JXA with .labelOffset | ...Rotation | ...Position:
[details=JXA properties of line and label]```JavaScript
[
{
"sidePadding": 5,
"blendColor": null,
"tag": null,
"cornerRadius": 0,
"userName": null,
"blendFraction": 0.5,
"name": "Rectangle",
"fill": "solid fill",
"gradientAngle": 90,
"drawsStroke": false,
"strokePattern": 0,
"startangle": 0,
"innerradius": 0,
"starpoints": 0,
"labeloffset": 0,
"strokeCap": "round",
"id": 29,
"shaftHeight": 0,
"drawsShadow": false,
"autosizing": "full",
"shadowFuzziness": 3,
"text": "Label here",
"imageScale": 0,
"textrotation": 0,
"rankGroup": null,
"textPlacement": "center",
"rotation": 0,
"endangle": 0,
"interlineSpacing": 0,
"allowsConnections": true,
"locked": false,
"alignsEdgesToGrid": true,
"relativeTextRotation": true,
"arrowWidth": 0,
"intercharacterSpacing": 0,
"notes": null,
"url": null,
"gradientColor": [
0.15056076645851135,
0.15054550766944885,
0.15056076645851135
],
"flippedHorizontally": false,
"magnets": [],
"labelrotation": "horizontal",
"strokeJoin": "round",
"script": null,
"thickness": 1,
"userData": null,
"jump": null,
"pointList": null,
"shadowColor": [
0,
0,
0
],
"strokeColor": [
0,
0,
0
],
"verticalPadding": 5,
"doubleStroke": false,
"group": null,
"flippedVertically": false,
"shadowBeneath": false,
"fillColor": [
1,
0.999969482421875,
0.9999847412109375
],
"labelposition": 0.4237898290157318,
"imageSizing": "manual",
"image": null,
"class": "shape"
},
{
"pointList": [
[
544.7480363569863,
360.0000032663345
],
[
325.9842549262084,
424.01540719670265
]
],
"bezierPointList": null,
"destination": null,
"drawsShadow": false,
"notes": null,
"flippedHorizontally": false,
"strokeCap": "round",
"thickness": 2,
"tag": null,
"tailScale": 1,
"id": 28,
"jump": null,
"headMagnet": 0,
"hopType": "no hop",
"userData": null,
"allowsConnections": true,
"strokeJoin": "round",
"rankGroup": null,
"strokeColor": [
0.9862363338470459,
0.007110704202204943,
0.027420463040471077
],
"class": "line",
"tailMagnet": 0,
"shadowBeneath": false,
"cornerRadius": 0,
"doubleStroke": false,
"shadowFuzziness": 3,
"alignsEdgesToGrid": true,
"headType": "FilledArrow",
"group": null,
"flippedVertically": false,
"shadowColor": [
0,
0,
0
],
"headScale": 1,
"url": null,
"drawsStroke": true,
"userName": null,
"source": null,
"strokePattern": 0,
"tailType": null,
"script": null,
"locked": false
}
]