Issue changing Overview box color with ReactOverview component after upgrade

Hi,

I have a bug related to setting the color of the overview box. My app takes advantage of the gojs-react library. To set the overview box color, we would apply the recommended approach in our initOverview function to be passed into the ReactOverview component.

private initOverview(): go.Overview {
    const $ = go.GraphObject.make;
    const overview = $(go.Overview, { contentAlignment: go.Spot.Center });
    **(overview.box.elt(0) as go.Shape).stroke = "blue";**
    return overview;
  }

I tested applying that overview color change line in a non-react sample and it actually still works. However, this is not the case for samples that take advantage of react.

Here is the sample I personally tested with, React with Overview Sample.

If I add that overview color change in the sample’s initOverview function, it does not work for v3.0.8. However, if I change the version of the sample to use v2.3.9, it does work.

Not sure if a change must happen on my end, gojs, or gojs-react. Let me know which of the three and if it’s my end, what to do because it isn’t clear.

Looking into this.

It’s unclear why that’s not working and will require some further debugging, but you can use the following instead:

  private initOverview(): go.Overview {
    const overview = new go.Overview({
      contentAlignment: go.Spot.Center,
      box:
        new go.Part({
            selectable: true, selectionAdorned: false, selectionObjectName: 'BOXSHAPE',
            locationObjectName: 'BOXSHAPE', resizeObjectName: 'BOXSHAPE', cursor: 'move'
          })
          .add(new go.Shape({ name: 'BOXSHAPE', fill: 'transparent', stroke: 'blue', strokeWidth: 2 }))
    });
    return overview;
  }

This did fix the issue for me, thank you very much!