I’m trying to create a custom shape that only has two link points, similar to “DC Voltage Source 1” in the “Circuit Diagrams” → “Power Sources” library. Link points are circled in green.
When I try to create a custom shape, I can add link points just fine. There are two below in my custom shape in the corners (because I am debugging right now), and they are circled in green. These appear when I am drawing a line.
The trouble is, there are four points that show up by default, and I can’t figure out how to get rid of them. They behave differently from the link points above and show up whenever I hover the cursor over my custom shape.
What are these four default points, and how can I modify the custom shape definition to remove them? The “DC Voltage Source 1” shape from Lucid’s library doesn’t have them, so it must be possible. I just can’t figure it out from the documentation.
Here’s “library.manifest” for my custom shape:
{
"name": "Electrical Symbols",
"shapes": "
{
"shape": "diode",
"name": "Diode",
"defaults": {
"width": 40,
"height": 20
}
}
]
}
Here’s “diode.shape” for my custom shape:
{
properties: c],
locked: j'aspectRatio'],
style: {
fill: { type: 'color', color: '#00000000' },
stroke: { color: '#000000', width: 2},
rounding: 0
},
geometry:
{
type: 'path'
path: 'M 0 0.5 L 1 0.5'
},
{
type: 'path',
"path": 'M 0.25 0 L 0.25 1 L 0.75 0.5 Z'
},
{
'type': 'path',
'path': 'M 0.75 0 L 0.75 1'
}
],
linkpoints:
{x: 0, y: 0},
{x: 1, y: 1}
],
bounds: {
x: 0.5,
y: 0.5,
w: 1.0,
h: 1.0,
anchor: 'center',
absolute: 'false'
}
}
Thanks,
Ben