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
  }
}
