strokeWidth = 0 of svg icon in link adornment is ignored

Hello,

do you have any idea why in the following example the strokeWidth of the svg Shape (0) is ignored and the svg shape is drawn with the stroke width of the first shape of the link (10)?

diagram.linkTemplate = 
  $(go.Link,
      $(go.Shape, { strokeWidth: 10 }),
      $(go.Shape, { toArrow: "Standard" }),
      {
        selectionAdornmentTemplate:
          $(go.Adornment,
            $(go.Shape,
              { isPanelMain: true, stroke: "dodgerblue", strokeWidth: 8 }),
            $(go.Shape, "Circle",
              { fill: "lightcoral", strokeWidth: 0, width: 65, height: 65 },
            new go.Binding("fill", "color")),
            $(go.Shape,
              { margin: 3, fill: "green", strokeWidth: 0, geometryString: "M32 18.451l-16-12.42-16 12.42v-5.064l16-12.42 16 12.42zM28 18v12h-8v-8h-8v8h-8v-12l12-9z" })
          )  // end Adornment
      }
    );

Setting a stroke width other than 0 on the svg shape works as expected.

goJS Version: 2.1.15

We’ll look into this.

BTW, if you want that last Shape to be filled with “green”, you need to make sure the geometry supports it. Either prepend an “F” command to the string, or call the static Geometry.fillPath function.

This is partially a bug. When a strokeWidth of 0 is used on Link adornments, we set the strokeWidth to the Link’s Main Shape strokeWidth, so that the selection Adornment can scale as the link thickness scales. However, this is not well documented.

Also, this only needs to happen on Adornment main element shapes, and your SVG-path Shape is not one of those, so we consider that a bug. In the next release it should work as you expect, here.

In the meantime, instead of setting the strokeWidth to 0 on that SVG shape, you could set stroke to null, and it should work as you’d expect. Note you will also want to add "F " to the beginning of the SVG path to indicate that it is a fillable path, so that it shows up.

Thanks, setting stroke = null worked!

(The fill/geometryString issue was just some inconsistency in the example, in my application I am using the mentioned fillPath option already.)