Lai,Risheng
2023-11-02 30c02e0c981b16be0918483543f4b812956c45d4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Quintiq file version 2.0
#parent: #root
Method PopulateDisplaySequence (
  output owning shadow[SCVConfiguration] scvConfig,
  Boolean isupstream,
  shadow[SCVNode] node
) id:Method_FormSupplyChainVisualization_PopulateDisplaySequence
{
  #keys: '[132894.0.964050708]'
  Body:
  [*
    // With this method, we go to all the nodes
    // that doesn't spread out anymore, and position
    // their Ys OffsetY apart
    
    inputnodes := selectsortedset( scvConfig, SCVNode, n,
                                   n.Depth() = node.Depth() + 1
                                   and n.IsUpstream() = isupstream
                                   and n.OwnerNodeKey() = node.Key().AsQUILL(),
                                   n.SortSequence() )
    
    if( inputnodes.Size() < 1 )
    {
      node.Y( scvConfig.BorderOffsetY() + scvConfig.OffsetY() * ( scvConfig.DisplaySequence() ) )
      scvConfig.DisplaySequence( scvConfig.DisplaySequence() + 1 );
    }
    else
    {
      traverse( inputnodes, Elements, e )
      {
        this.PopulateDisplaySequence( &scvConfig, isupstream, e );
      }
    }
  *]
}