i want this much curve in my nodes block i used rectanglerounded and parameter1.
this is my node here i gave parameter1: 40
Try this figure:
go.Shape.defineFigureGenerator("CapsuleH", function(shape, w, h) {
var geo = new go.Geometry();
if (w < h) {
var fig = new go.PathFigure(w/2, 0, true);
fig.add(new go.PathSegment(go.PathSegment.Bezier, w/2, h, w, 0, w, h));
fig.add(new go.PathSegment(go.PathSegment.Bezier, w/2, 0, 0, h, 0, 0));
geo.add(fig);
return geo;
} else {
var fig = new go.PathFigure(h/2, 0, true);
geo.add(fig);
// Outline
fig.add(new go.PathSegment(go.PathSegment.Line, w-h/2, 0));
fig.add(new go.PathSegment(go.PathSegment.Arc, 270, 180, w-h/2, h/2, h/2, h/2));
fig.add(new go.PathSegment(go.PathSegment.Line, w-h/2, h));
fig.add(new go.PathSegment(go.PathSegment.Arc, 90, 180, h/2, h/2, h/2, h/2));
return geo;
}
});
example: https://codepen.io/simonsarris/pen/MWxwooX?editors=1010
This will actually be a built-in figure in GoJS 3.0 (to be released next year)
You have given the code for styling whole block but i want to place circle inside my nodeBlock
Main the primary node panel a Spot panel and put a circle inside of it: https://codepen.io/simonsarris/pen/MWxwooX?editors=1010
presumably you want an auto panel that has a circle, and not just a circle, to add text too