MasterK Posted August 15, 2016 Share Posted August 15, 2016 http://www.babylonjs-playground.com/#1CCIMC#0 set rectangle marginAlignment: "h:left, v:top". Then add rectangle's height, it should go down. not go up. @Nockawa or anyone. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 15, 2016 Share Posted August 15, 2016 @Nockawa is on holidays but will soon be back Quote Link to comment Share on other sites More sharing options...
Nabroski Posted August 15, 2016 Share Posted August 15, 2016 http://www.w3schools.com/css/css_margin.asp https://doc.babylonjs.com/classes/2.4/PrimitiveThickness http://www.babylonjs-playground.com/#1CCIMC#2 @MasterK http://www.babylonjs-playground.com/#1CCIMC#3 Quote Link to comment Share on other sites More sharing options...
MasterK Posted August 16, 2016 Author Share Posted August 16, 2016 @Nabroski what's your point? do you agree with me? I dont want use many method to set position. just use h:***, v:*** and x,y. Quote Link to comment Share on other sites More sharing options...
Nabroski Posted August 16, 2016 Share Posted August 16, 2016 @MasterK I sorry to hear are in trouble and i hope Nockawa catch up soon the top is your starting point 0 you inverting the -y value and then starts adding ... -100 + 100 = 0 (you are at the starting point again) 100, 200 ...http://www.babylonjs-playground.com/#1CCIMC#4 i have to think over it. Quote Link to comment Share on other sites More sharing options...
MasterK Posted August 16, 2016 Author Share Posted August 16, 2016 @Nabroski Yes you're right. I forgot to say this right situation your give. By the contrast, it's better to explain this is a bug... Nabroski 1 Quote Link to comment Share on other sites More sharing options...
Nockawa Posted August 16, 2016 Share Posted August 16, 2016 Ok, basically: it's either you use absolute positioning through the position property (or the x/y properties which are shortcut) of your primitive or you rely on positioning and you should not set a position: the position will be computed by the positioning engine and the result will be stored in the actualPosition property. In this doc this is what I try to say by: Quote Alignment: a primitive can use only a portion of the Layout Area it's assigned to. To help define how it should be positioned into this Area you can rely on Absolute Positioning (defined by the position property of the primitive) or on Alignment using the marginAlignment property You have to rely on the margin property to create the offset you need, I've changed your PG to illustrate it: http://www.babylonjs-playground.com/#1CCIMC#6 The fact that setting x/y/position change the final result is what I would call an "unexpected behavior" I need to improve the documentation I mentioned above to clarify this. Quote Link to comment Share on other sites More sharing options...
MasterK Posted August 17, 2016 Author Share Posted August 17, 2016 6 hours ago, Nockawa said: Ok, basically: it's either you use absolute positioning through the position property (or the x/y properties which are shortcut) of your primitive or you rely on positioning and you should not set a position: the position will be computed by the positioning engine and the result will be stored in the actualPosition property. In this doc this is what I try to say by: You have to rely on the margin property to create the offset you need, I've changed your PG to illustrate it: http://www.babylonjs-playground.com/#1CCIMC#6 The fact that setting x/y/position change the final result is what I would call an "unexpected behavior" I need to improve the documentation I mentioned above to clarify this. OK.... I accept that.... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.