Scrolling diagram grows drop shadows exponentially


We have a group type node that has dropShadows enabled same as all other nodes and it seems to create an infinitely growing shadow when scrolling over the diagram. Any ideas where this stems from?

        background: 'transparent',
        ungroupable: true,
        margin: new go.Margin(10),
        movable: false,
        deletable: false,
        shadowOffset: new go.Point(0, 3),
        shadowColor: this.colors.shadowColor,
        shadowBlur: 6,
        selectable: false,
        shadowVisible: true,
        // when the selection is dropped into a Group, add the selected Parts into that Group;
        // if it fails, cancel the tool, rolling back any changes
        handlesDragDropForMembers: false, // don't need to define handlers on member Nodes and Links
        // Groups containing Groups lay out their members horizontally
        layout: $(go.GridLayout, {
          wrappingColumn: 1,
          alignment: go.GridLayout.Position,
          cellSize: new go.Size(1, 1),
          spacing: new go.Size(4, 4)

You do need to set Group.isShadowed to true.

If you comment out the settings of Group.background and shadowVisible, it seems to draw the shadow correctly.

We can check on whether having either of those two properties set is causing a bug or not.

Or change background to “white” or some other non-transparent color.

This is pretty strange. I can’t reproduce the issue with just the code you’ve given so far, can you tell us more? Or can you take a look at my reproduction and change it to be more like the issue you’re seeing?

Note that setting both:

 background: 'transparent',
 shadowVisible: true,

On a Panel is unexpected. If a background exists, it will try to shade the background instead of inner elements. But a transparent background can only draw a transparent shadow, by the rules of the HTML Canvas element. So shadowVisible is not necessary if a background is set, but a shadow cannot be drawn on that element itself anyway. Best to set shadowVisible on the element that does have the background color.

Thank you, I replaced shadowVisible with isShadowed and moved shadowVisible down to my shape instead. Seems to have gone away. It definitly seemed like a weird bug at the time and it was simply my mix up of the 2 properties that caused it, seems background has no effect.