I am able to add ports to a rectangle using joint.shapes.devs.Model
but the same is not working for a circle.
Here's what I have tried to add ports to circle:
var circle1 = new joint.shapes.basic.Circle({
position: {x: 100, y: 225},
size: {width: 51, height: 51},
outPorts: [''],
attrs: {
'.': {magnet: true},
'.label': {text: '', 'ref-x': .4, 'ref-y': .2},
'.inPorts circle': {type: 'input'},
'.outPorts circle': {type: 'output'},
'.port-body': {r: 4}
}
});
graph.addCell(circle1);
I can see that Circle is created but with out ports. I couldn't find any documentation on this. Any help would be appreciated. Thanks