Shape with a double border


I’m just wondering what is the best approach for drawing shapes with a double border? Our users can add various different shapes to the diagram and we let them set the border width to none, single, thick or double. The first three are easily achieved, but I’m wondering how I can add the double border?

I was thinking adding another shape that is slightly smaller might be the way to go, but I am not sure what would happen when I then hide that shape for the other settings of border width (I’m guessing any child objects would also disappear?)

I spotted pathPattern and I’ve seen the example with links. Should this work with shapes other than links? I tried it out but without any luck

Why not a custom geometry that has two paths, sort of like the built in “FramedRectangle” geometry? You may be able to just use that geometry (with no fill) if it suits your use case.

Also, you can always nest Auto panels.

Thanks, I’ll take a look at that

Finally got round to looking at this and custom geometries do the trick nicely. For anyone else like me who knows nothing about the format of geometry strings, I found looking at the GoJS Shapes example, setting a breakpoint on mouseEnter and looking at the value of e.targetObject.geometryString meant I could find the geometry string for a similar shape to what I was after and hack around with it until I got what I needed.