hongji.li
2023-11-11 df5a7e1ad6835e78b2f9eb7428817b0c23b116bc
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
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 );
  *]
}