X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=docs%2Fcontent%2Fshared-javascript-and-cpp-documentation%2Ffundamentals.md;h=d341445a098be59c5deeaf1b34fcd34dfc3e6fc7;hb=a553fa0d7b974732895ef7d4f0c629f9894d115b;hp=cce3bd40d037fdb5a667de8c53164e81122a5e43;hpb=2c2f52b1e6f532312359afbf5910a44943bbb87b;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/docs/content/shared-javascript-and-cpp-documentation/fundamentals.md b/docs/content/shared-javascript-and-cpp-documentation/fundamentals.md index cce3bd4..d341445 100644 --- a/docs/content/shared-javascript-and-cpp-documentation/fundamentals.md +++ b/docs/content/shared-javascript-and-cpp-documentation/fundamentals.md @@ -38,6 +38,7 @@ downwards**. This is intended to be convenient when laying-out 2D views. ## Positioning Actors {#positioning-actors} An actor inherits its parent's position. The relative position between the actor & parent is determined by 3 properties: + 1) ParentOrigin. This Vector3 property defines a point within the parent actor's area. ![ ](../assets/img/parent-origin.png) @@ -57,9 +58,9 @@ The default is "center", which can be visualized in 2D as (0.5, 0.5), but is act ![ ](../assets/img/actor-position.png) ![ ](actor-position.png) -Therefore by default, an actors position is the distance between its center and the top-left corner of its parent. +The default is (X = 0, Y = 0), so an actor placed directly without modifying the parent origin, anchor point or position would appear centred around the top left corner of its parent. -An actor added directly to the stage with position (X = stageWidth*0.5, Y = stageHeight*0.5), would appear in the center of the screen. Likewise an actor with position (X = actorWidth*0.5, Y = actorWidth*0.5), would appear at the top-left of the screen. +An actor added directly to the stage with position (X = stageWidth*0.5, Y = stageHeight*0.5), would appear in the center of the screen. Likewise an actor with position (X = actorWidth*0.5, Y = actorWidth*0.5), would appear at the top-left of the screen. However, basic positioning like that is normally done via changing the parent origin and/or anchor point instead - use ParentOrigin::CENTER and AnchorPoint::CENTER to place the actor in the center of the screen, and ParentOrigin::TOP_LEFT and AnchorPoint::TOP_LEFT to place it inside the screen on the top left. Note that since DALi is a 3D toolkit, this behaviour is the result of a default perspective camera setup.