I want to create a port like this below
go.Shape.defineFigureGenerator("CShape", function (shape, w, h) {
return new go.Geometry()
.add(
new go.PathFigure(w - 10, 0, false)
.add(new go.PathSegment(go.PathSegment.Line, w, 0))
.add(new go.PathSegment(go.PathSegment.Line, w, h))
.add(new go.PathSegment(go.PathSegment.Line, w - 10, h))
);
});
the above is the code for the shape which creates Square bracket shape but when i use that in port
it looks like this, which obviously because of the angle, how do i change the angle of the shape based on the 4 ports provided on the shape,
the ports are located on the center of all the 4 sides of rectangle shape