Group Template Node Position issue when reloading the diagram

My diagram contains a Group containing several enclosed nodes. Both the group and nodes uses 2 way location binding for positioning. The group template contains a placeholder. Initially, the group/nodes renders correctly. Next, I drag one of the nodes to expand the group border. The group position and the updated node positions are saved correctly to the backend. Now, when I reload the diagram the group and the enclosed nodes renders to the initial coordinates. The position data I received from the backend is correct (position after the drag) and the node and link models contains the correct data/positon. What am I missing?

Group Template

function getGroupTemplate(propertiesPanelClick, groupContextMenu) {
      return make(gojs.Group, 'Auto',
      {
        click: propertiesPanelClick,
        contextMenu: groupContextMenu,
        layoutConditions: gojs.Part.LayoutStandard && !gojs.Part.LayoutNodeSized,
        // define the group's internal layout
        layout: make(gojs.TreeLayout,
        {angle: 90, isRealtime: false, layerSpacing: 20})
      },
        new gojs.Binding('location', '', toLocation).makeTwoWay(fromLocation),
        make(gojs.Shape, 'RoundedRectangle',  // the border
      {stretch: gojs.GraphObject.Vertical, fill: 'white', strokeWidth: 2, strokeDashArray: [12, 3]}),
      make(gojs.Panel, 'Table', {
        // maxSize: new gojs.Size(1150, 999),
        // margin: new gojs.Margin(5, 5, 5, 5)
      },
      make(gojs.RowColumnDefinition, {column: 0, minimum: 60}),
      make(gojs.RowColumnDefinition, {column: 1, minimum: 180, separatorStroke: 'black'}),
      make(gojs.TextBlock,         // Switchgear name
      {
        column: 0,
        spacingAbove: 4,
        alignment: gojs.Spot.TopLeft,
        alignmentFocus: gojs.Spot.BottomRight,
        font: 'normal normal 400 normal 14px Roboto',
        wrap: 'WrapFit'
      },
      new gojs.Binding('text', 'name')),
      make(gojs.Placeholder,    // represents the area with all devices inside Switchgear,
      {padding: 5, column: 1})  // some extra padding around devices inside Switchgear
      ));
    }

layoutConditions: gojs.Part.LayoutStandard && !gojs.Part.LayoutNodeSized
is incorrect. The Part.layoutConditions property is of type number, but you are assigning it a boolean (which is always false). Use this instead:

    layoutConditions: gojs.Part.LayoutStandard & ~gojs.Part.LayoutNodeSized

If you were using go-debug.js, it would have caught that error.

However, I don’t know if that would explain the problem that you have.

Walter, thank you for catching my mistake unfortunately the same issue still occurs. Any other suggestions please.

I think the problem is that when you load the model the layouts are performed. If you want a layout not to be performed then, set or bind Layout.isInitial to false.

For more discussion: https://gojs.net/latest/intro/layouts.html#LayoutInvalidation