陈清红
2025-04-14 880f3c0257eeb8c37761d484258fdd102a369a19
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Quintiq file version 2.0
#parent: CustomDrawSCO/CustomDrawDataLayerNode
Response OnDrawObject (
  Node object
) id:Response_CustomDrawSCO_CustomDrawDataLayerNode_OnDrawObject
{
  #keys: '[136682.0.1903683532]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebCustomDrawDataLayer_OnDrawObject'
  QuillAction
  {
    Body:
    [*
      // Draw node
      img := object.IconName();
      
      if( img = '' )
      {
        if( object.istype( UnitNode ) )
        {
          img := GlobalParameters_MP::GetDefaultUnitIcon();
        }
        else if( object.istype( StockingPointNode ) )
        {
          img := GlobalParameters_MP::GetDefaultStockingPointIcon();
        }
        else if( object.istype( ProductNode ) )
        {
          img := GlobalParameters_MP::GetDefaultProductIcon();
        }
      
      }
      
      minsize := minvalue ( object.Height(), object.Width() );
      surface.Image( 0, 0, minsize, minsize, img + '(32)' );
      
      /*
        If we are dragging an object which are not initially highlighted and some objects are already
        highlighted. We will flush all objects in DataHolderHighlight, then highlight the selected
        object and add it to DataHolderHighlight.
      */
      if( exists( DataHolderHighlight.Data(), Elements, u,u = object ) )
      {
        surface.Pen().Color( ColorScheme.RoutingConfigurator_RoutingOutline() );
        surface.Pen().Style( PenSpecification::StyleSolid() );
        surface.Pen().Width( 1 );
        surface.Draw( region.Shape() );
      }
    *]
    GroupServerCalls: false
  }
}