Part in Temporary Layer is not rendering

Hi,

I am trying to render a “second grid”, that is independent of the base GoJS Grid in the “Grid” Layer.
For that I added an extra layer.

const secondGrid= new go.Layer({
            name: 'SecondGrid',
            isTemporary: true
        });
const gridLayer = this.diagram.findLayer('Grid')!;
diagram.addLayerAfter(secondGrid, gridLayer);

Then I add a node via ‘diagram.add()’ which acts as the secondGrid.
Template for the secondGrid:

$(
        go.Node,
        'Auto',
        {
            layerName: 'SecondGrid',
        },
        $(
            go.Panel,
            go.Panel.Grid,
            { gridCellSize: new go.Size(1, 1) },
            $(
                go.Shape,
                'LineH',
                { stroke: 'blue', strokeWidth: 0.5, interval: 5 }
            ),
            $(
                go.Shape,
                'LineV',
                { stroke: 'blue', strokeWidth: 0.5, interval: 5   }
            )
        )
    );

The problem is that the node wont render, it is not visible.
The node renders just fine, in layers (existing or new) where the ‘isTemporary’ flag is set to false.
What could the reason for that be?

Actually, it may just be the case that you need to give the object you are adding a position or location. The default layout assigns locations to all nodes that do not have one, but will not do this for temporary parts (or parts in temporary layers).

This was the solution. Thank you!