Quintiq file version 2.0
#parent: CustomDrawComponent/CustomDrawDataLayerNode
Response OnDrop (
  structured[UnitNode] source,
  StockingPointNode droptarget
) id:Response_CustomDrawComponent_CustomDrawDataLayerNode_OnDrop_870
{
  #keys: '[110994.0.669320412]'
  Body:
  [*
    // Link unit nodes to stocking point node
    feedback := '';
    sources := selectset( source, Elements.Unit, u, true, true );
    
    if ( droptarget.StockingPoint_MP().CanLinkToUnits( feedback, sources, false ) )
    {
      droptarget.StockingPoint_MP().LinkToUnits( sources, false );
    }
    else
    {
      droptarget.StockingPoint_MP().RemoveAsOutputFromUnits( sources );
    }
  *]
  DefinitionID: 'Responsedef_CustomDrawDataLayer_OnDrop'
  UserRequiresReadWrite: true
}
