Quintiq file version 2.0 
 | 
#parent: CustomDrawComponent/CustomDrawDataLayerNode 
 | 
Response OnDrop ( 
 | 
  Object source 
 | 
) id:Response_CustomDrawComponent_CustomDrawDataLayerNode_OnDrop_202 
 | 
{ 
 | 
  #keys: '[110880.3.910119769]' 
 | 
  Body: 
 | 
  [* 
 | 
    // Select area 
 | 
    ApplicationLibMacroPlanner.SupplyChainDiagramSelectArea( x, y ); 
 | 
  *] 
 | 
  DefinitionID: 'Responsedef_CustomDrawDataLayer_OnDrop' 
 | 
  Precondition: 
 | 
  [* 
 | 
    /* 
 | 
      When source is not binded to any object, it will accept any object. 
 | 
      eg. As long as you drag and drop anything into CustomDraw region and there's no 
 | 
          proper response, this response will be executed. 
 | 
          This is undesirable, as this response will be executed unexpectedly and 
 | 
          we do not know its exact behaviour. 
 | 
     
 | 
      To ensure that select area works properly, bind source to object, and make sure 
 | 
      object dragged is not unit. This will ensure that the precondition mesage on OnDrop 
 | 
      responses 'Drag and drop a unit, show it at dropped location' will always appear when 
 | 
      unit on incorrect level are dragged and dropped. 
 | 
    */ 
 | 
    return DataHolderHighlight.Data().Size() = 0 and not source.istype( Unit ); 
 | 
  *] 
 | 
} 
 |