Setting layerName on selectionAdornmentTemplate breaks the diagram

When a layer is specified for selection adornments, after a few selects and deselects the diagram will stop rendering any updates. The console will show this error:
image

selectionAdornmentTemplate used:

    selectionAdornmentTemplate: $(go.Adornment, 'Auto', { layerName: '' },
      $(go.Shape, 'RoundedRectangle', {
        fill: null,
        parameter1: 24,
        stroke: 'red',
        strokeWidth: 3,
      }),
      $(go.Placeholder, {
        margin: -12,
      })
    )

This will also happen for other layers. any chance to prevent that? I need the adornment to be rendered below the node itself.

Thanks for reporting this – we’ll look into it, although I didn’t encounter such a bug when the Adornment’s layer was “Background”.

This should be fixed in both 1.8.33 and the next 2.0 beta. Thanks for reporting the problem.

1 Like