If you set the placement attribute on a node, that node will be placed as a sub-node of the first, similar named descendant element of the node's lexical parent. If no matching descendant element was found, the node is placed as a sub-node of its lexical parent. You can change this default behaviour by overriding the "determinePlacement(..)" method. In your test-case you need to override "determinePlacement(..)" on <loginClass> with:

<method name="determinePlacement" args="aSub, placement, args">

  if (placement == 'canvas') {

    return canvas;

  } else {

    return super.determinePlacement(aSub, placement, args);

  }

</method>

Without overriding "determinePlacement(..)", setting "placement='canvas'" leads to a search for a sub-node resp. a sub-node of sub-nodes etc. of <loginClass> with the name "canvas". This search won't return any element (since no descendant element is named "canvas"), therefore "myRegisterClass" is just placed as a sub-node of <loginClass>.

As demonstrated, overriding "determinePlacement(..)" allows a fine-grained control over the complete placement of nodes, so use it with care! :-)


- André


On 2/9/2010 6:49 PM, [email protected] wrote:
I have written a small test that has been attached. When i use the placement attribute, element in the class appears on the canvas, there is no problem at this point. But i donT know that; why when i want to animate the myLoginClass(in the example), ItS child(myRegisterClass) also is animating although i have set the placement to *canvas*. I just want that *myLoginClass* should animate, not both of them. I hope you will have a few minutes to have a look at the code. Thanks.
[....]
--
Cem SONMEZ

Reply via email to