text: [{"Owner":"royibernthal","Date":"2016-08-30T21:41:25Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tI tried to create a text centering solution.\n_lt_/p_gt_\n\n_lt_p_gt_\n\t \n_lt_/p_gt_\n\n_lt_p_gt_\n\tI create a Group2D container for a Text2D - textFieldContainer.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tInside the container I create a Text2D (naturally) - textField.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tWhenever I change the text_co_ I set textField.x to be textField.width / 2 (textField.width returns different values for different widths as expected).\n_lt_/p_gt_\n\n_lt_p_gt_\n\tBy doing that I_t_m attempting to keep the actual text centered to the (0_co_ 0) of the textFieldContainer. (and so I_t_m able to play freely with textFieldContainer_t_s x and y without affecting textField.x centering solution.\n_lt_/p_gt_\n\n_lt_p_gt_\n\t \n_lt_/p_gt_\n\n_lt_p_gt_\n\tThe problem is the text isn_t_t actually being moved on screen.\n_lt_/p_gt_\n\n_lt_p_gt_\n\t \n_lt_/p_gt_\n\n_lt_p_gt_\n\tI created a PG reproducing this problem_dd_\n_lt_/p_gt_\n\n_lt_p_gt_\n\t_lt_a href_eq__qt_http_dd_//www.babylonjs-playground.com/#1088V8%231_qt_ rel_eq__qt_external nofollow_qt__gt_http_dd_//www.babylonjs-playground.com/#1088V8#1_lt_/a_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tLine 24 has no effect at all_co_ commenting it results in the same display.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tI created the marker textField to help you see better that the text is not moved.\n_lt_/p_gt_\n\n_lt_p_gt_\n\t \n_lt_/p_gt_\n\n_lt_p_gt_\n\tIt_t_s as if there_t_s an extra placement logic for Text2D behind the curtains that_t_s preventing me for moving it around properly.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tI also tried playing with textField.origin_co_ to no avail.\n_lt_/p_gt_\n\n_lt_p_gt_\n\t \n_lt_/p_gt_\n\n_lt_p_gt_\n\tI attached an image demonstrating how it is now (X)_co_ and how it should look centered (V).\n_lt_/p_gt_\n\n_lt_p_gt_\n\t \n_lt_/p_gt_\n\n_lt_p_gt_\n\t_lt_a class_eq__qt_ipsAttachLink ipsAttachLink_image_qt_ href_eq__qt_http_dd_//www.html5gamedevs.com/uploads/monthly_2016_08/ss.png.789a54bb2e6f9cba63380c98265ecc2b.png_qt_ data-fileid_eq__qt_9271_qt_ rel_eq__qt__qt__gt__lt_img alt_eq__qt_ss.png_qt_ class_eq__qt_ipsImage ipsImage_thumbnailed_qt_ data-fileid_eq__qt_9271_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/monthly_2016_08/ss.png.789a54bb2e6f9cba63380c98265ecc2b.png_qt_ /_gt__lt_/a_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\t \n_lt_/p_gt_\n\n_lt_p_gt_\n\t_lt_a contenteditable_eq__qt_false_qt_ data-ipshover_eq__qt__qt_ data-ipshover-target_eq__qt_http_dd_//www.html5gamedevs.com/profile/18979-nockawa/?do_eq_hovercard_qt_ data-mentionid_eq__qt_18979_qt_ href_eq__qt_http_dd_//www.html5gamedevs.com/profile/18979-nockawa/_qt_ rel_eq__qt__qt__gt_@Nockawa_lt_/a_gt_\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"adam","Date":"2016-08-31T11:10:04Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\t_lt_a href_eq__qt_http_dd_//www.babylonjs-playground.com/#1088V8%233_qt_ rel_eq__qt_external nofollow_qt__gt_http_dd_//www.babylonjs-playground.com/#1088V8#3_lt_/a_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\t_lt_a href_eq__qt_http_dd_//doc.babylonjs.com/overviews/Canvas2D_PosTransHierarchy_qt_ rel_eq__qt_external nofollow_qt__gt_http_dd_//doc.babylonjs.com/overviews/Canvas2D_PosTransHierarchy_lt_/a_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\t_lt_a href_eq__qt_http_dd_//doc.babylonjs.com/overviews/Canvas2D_Prim_Positioning_qt_ rel_eq__qt_external nofollow_qt__gt_http_dd_//doc.babylonjs.com/overviews/Canvas2D_Prim_Positioning_lt_/a_gt_\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"royibernthal","Date":"2016-08-31T14:00:14Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tThanks_co_ it indeed works_co_ but is there a way to do it without making the parent fixed size? (100_co_ 100)\n_lt_/p_gt_\n\n_lt_p_gt_\n\tI_t_d like to retain centering while keeping the size of the object dynamic and reflecting its actual current size_co_ according to the logic in my previous post_co_ if possible.\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"adam","Date":"2016-08-31T16:38:14Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t_lt_p_gt_\n\t_lt_a href_eq__qt_http_dd_//www.babylonjs-playground.com/#1088V8%234_qt_ rel_eq__qt_external nofollow_qt__gt_http_dd_//www.babylonjs-playground.com/#1088V8#4_lt_/a_gt_\n_lt_/p_gt_\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Nockawa","Date":"2016-08-31T19:30:16Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\t_lt_a contenteditable_eq__qt_false_qt_ data-ipshover_eq__qt__qt_ data-ipshover-target_eq__qt_http_dd_//www.html5gamedevs.com/profile/8420-royibernthal/?do_eq_hovercard_qt_ data-mentionid_eq__qt_8420_qt_ href_eq__qt_http_dd_//www.html5gamedevs.com/profile/8420-royibernthal/_qt_ rel_eq__qt__qt__gt_@royibernthal_lt_/a_gt_ does _lt_a contenteditable_eq__qt_false_qt_ data-ipshover_eq__qt__qt_ data-ipshover-target_eq__qt_http_dd_//www.html5gamedevs.com/profile/4289-adam/?do_eq_hovercard_qt_ data-mentionid_eq__qt_4289_qt_ href_eq__qt_http_dd_//www.html5gamedevs.com/profile/4289-adam/_qt_ rel_eq__qt__qt__gt_@adam_lt_/a_gt_ solved it?\n_lt_/p_gt_\n\n_lt_p_gt_\n\tThanks adam for the contribution! I appreciate a lot!\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"royibernthal","Date":"2016-08-31T20:53:14Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t_lt_p_gt_\n\t_lt_a contenteditable_eq__qt_false_qt_ data-ipshover_eq__qt__qt_ data-ipshover-target_eq__qt_http_dd_//www.html5gamedevs.com/profile/18979-nockawa/?do_eq_hovercard_qt_ data-mentionid_eq__qt_18979_qt_ href_eq__qt_http_dd_//www.html5gamedevs.com/profile/18979-nockawa/_qt_ rel_eq__qt__qt__gt_@Nockawa_lt_/a_gt_ It does work_co_ thank you _lt_a contenteditable_eq__qt_false_qt_ data-ipshover_eq__qt__qt_ data-ipshover-target_eq__qt_http_dd_//www.html5gamedevs.com/profile/4289-adam/?do_eq_hovercard_qt_ data-mentionid_eq__qt_4289_qt_ href_eq__qt_http_dd_//www.html5gamedevs.com/profile/4289-adam/_qt_ rel_eq__qt__qt__gt_@adam_lt_/a_gt__co_ but is there some way to disable the forced alignments and work with pure x and y?\n_lt_/p_gt_\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"adam","Date":"2016-08-31T20:55:21Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t_lt_p_gt_\n\t_lt_a href_eq__qt_http_dd_//www.babylonjs-playground.com/#1088V8%236_qt_ rel_eq__qt_external nofollow_qt__gt_http_dd_//www.babylonjs-playground.com/#1088V8#6_lt_/a_gt_\n_lt_/p_gt_\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Nockawa","Date":"2016-08-31T20:57:26Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_blockquote class_eq__qt_ipsQuote_qt_ data-ipsquote_eq__qt__qt_ data-ipsquote-contentapp_eq__qt_forums_qt_ data-ipsquote-contentclass_eq__qt_forums_Topic_qt_ data-ipsquote-contentcommentid_eq__qt_142254_qt_ data-ipsquote-contentid_eq__qt_24870_qt_ data-ipsquote-contenttype_eq__qt_forums_qt_ data-ipsquote-timestamp_eq__qt_1472676794_qt_ data-ipsquote-userid_eq__qt_8420_qt_ data-ipsquote-username_eq__qt_royibernthal_qt__gt_\n\t_lt_div class_eq__qt_ipsQuote_citation_qt__gt_\n\t\t2 minutes ago_co_ royibernthal said_dd_\n\t_lt_/div_gt_\n\n\t_lt_div class_eq__qt_ipsQuote_contents_qt__gt_\n\t\t_lt_p_gt_\n\t\t\t_lt_a contenteditable_eq__qt_false_qt_ data-ipshover_eq__qt__qt_ data-ipshover-target_eq__qt_http_dd_//www.html5gamedevs.com/profile/18979-nockawa/?do_eq_hovercard_qt_ data-mentionid_eq__qt_18979_qt_ href_eq__qt_http_dd_//www.html5gamedevs.com/profile/18979-nockawa/_qt_ rel_eq__qt__qt__gt_@Nockawa_lt_/a_gt_ It does work_co_ thank you _lt_a contenteditable_eq__qt_false_qt_ data-ipshover_eq__qt__qt_ data-ipshover-target_eq__qt_http_dd_//www.html5gamedevs.com/profile/4289-adam/?do_eq_hovercard_qt_ data-mentionid_eq__qt_4289_qt_ href_eq__qt_http_dd_//www.html5gamedevs.com/profile/4289-adam/_qt_ rel_eq__qt__qt__gt_@adam_lt_/a_gt__co_ but is there some way to disable the forced alignments and work with pure x and y?\n\t\t_lt_/p_gt_\n\t_lt_/div_gt_\n_lt_/blockquote_gt_\n\n_lt_p_gt_\n\tI_t_m not sure I understand_co_ if you don_t_t specify margin/padding/alignment_co_ then it_t_s not on and you can use position/x/y. That_t_s the way it should be_co_ is there a default alignment setting that is contradictory with what I just said?\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"royibernthal","Date":"2016-08-31T20:59:08Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_blockquote class_eq__qt_ipsQuote_qt_ data-ipsquote_eq__qt__qt_ data-ipsquote-contentapp_eq__qt_forums_qt_ data-ipsquote-contentclass_eq__qt_forums_Topic_qt_ data-ipsquote-contentcommentid_eq__qt_142258_qt_ data-ipsquote-contentid_eq__qt_24870_qt_ data-ipsquote-contenttype_eq__qt_forums_qt_ data-ipsquote-timestamp_eq__qt_1472677046_qt_ data-ipsquote-userid_eq__qt_18979_qt_ data-ipsquote-username_eq__qt_Nockawa_qt__gt_\n\t_lt_div class_eq__qt_ipsQuote_citation_qt__gt_\n\t\t1 minute ago_co_ Nockawa said_dd_\n\t_lt_/div_gt_\n\n\t_lt_div class_eq__qt_ipsQuote_contents_qt__gt_\n\t\t_lt_p_gt_\n\t\t\tI_t_m not sure I understand_co_ if you don_t_t specify margin/padding/alignment_co_ then it_t_s not on and you can use position/x/y. That_t_s the way it should be_co_ is there a default alignment setting that is contradictory with what I just said?\n\t\t_lt_/p_gt_\n\t_lt_/div_gt_\n_lt_/blockquote_gt_\n\n_lt_p_gt_\n\tCould you see the PG in my first post? I don_t_t specify anything yet line 24 doesn_t_t do anything.\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Nockawa","Date":"2016-08-31T21:08:40Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tsorry_co_ I_t_ve missed the info_co_ too many things_co_ so I rushed_co_ yes_co_ I can see the issue now_co_ I_t_ve tried some other things that _lt_em_gt_should_lt_/em_gt_ work but it still doesn_t_t.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tBasically _qt_width_qt_ (which is a shortcut of size.width) is not the property to go for in  your case_co_ because you don_t_t set a size for your Text2d object. What you want to know is the width taken by the current text that is set and the textSize property is the one that should returns it. but I_t_ve tried to replace .width with .textSize.width and it still doesn_t_t work. It_t_s almost time for bed_co_ so I_t_ll check it tomorrow morning and keep you informed.\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"royibernthal","Date":"2016-08-31T21:14:21Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t_lt_p_gt_\n\tokay thanks\n_lt_/p_gt_\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"adam","Date":"2016-08-31T22:41:24Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tDid you look at the last PG I posted?\n_lt_/p_gt_\n\n_lt_div style_eq__qt_table-layout_dd_fixed_sm_width_dd_1401px_sm_line-height_dd_1.6_sm_color_dd_rgb(39_co_42_co_52)_sm_font-size_dd_14px_sm_margin-bottom_dd_20px_sm_margin-top_dd_0px_sm_font-family_dd__t_Helvetica Neue_t__co_ Helvetica_co_ Arial_co_ sans-serif_sm_font-style_dd_normal_sm_font-weight_dd_normal_sm_letter-spacing_dd_normal_sm_text-indent_dd_0px_sm_text-transform_dd_none_sm_white-space_dd_normal_sm_word-spacing_dd_0px_sm_background-color_dd_rgb(255_co_255_co_255)_sm__qt__gt_\n\t_lt_p style_eq__qt_margin-top_dd_0px_sm_margin-bottom_dd_0px_sm__qt__gt_\n\t\t_lt_a href_eq__qt_http_dd_//www.babylonjs-playground.com/#1088V8%236_qt_ rel_eq__qt_external nofollow_qt_ style_eq__qt_color_dd_rgb(173_co_20_co_87)_sm_text-decoration_dd_underline_sm_background-color_dd_transparent_sm__qt__gt_http_dd_//www.babylonjs-playground.com/#1088V8#6_lt_/a_gt_\n\t_lt_/p_gt_\n\n\t_lt_p style_eq__qt_margin-top_dd_0px_sm_margin-bottom_dd_0px_sm__qt__gt_\n\t\t \n\t_lt_/p_gt_\n\n\t_lt_p style_eq__qt_margin-top_dd_0px_sm_margin-bottom_dd_0px_sm__qt__gt_\n\t\tLine 26 is setting the position.\n\t_lt_/p_gt_\n\n\t_lt_p style_eq__qt_margin-top_dd_0px_sm_margin-bottom_dd_0px_sm__qt__gt_\n\t\t \n\t_lt_/p_gt_\n\n\t_lt_p style_eq__qt_margin-top_dd_0px_sm_margin-bottom_dd_0px_sm__qt__gt_\n\t\t \n\t_lt_/p_gt_\n_lt_/div_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"adam","Date":"2016-08-31T22:44:19Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tHere I took your original PG and just gave the cavas a size of 0 and now it works.\n_lt_/p_gt_\n\n_lt_p_gt_\n\t_lt_a href_eq__qt_http_dd_//www.babylonjs-playground.com/#1088V8%237_qt_ rel_eq__qt_external nofollow_qt__gt_http_dd_//www.babylonjs-playground.com/#1088V8#7_lt_/a_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\t \n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Nockawa","Date":"2016-09-01T05:50:44Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tThere are things I need to check up_co_ I know the positioning engine may not execute as expected in every cases_co_ it was quite difficult to mix it with absolute positioning and I didn_t_t code something very satisfying...\n_lt_/p_gt_\n\n_lt_p_gt_\n\t_lt_a contenteditable_eq__qt_false_qt_ data-ipshover_eq__qt__qt_ data-ipshover-target_eq__qt_http_dd_//www.html5gamedevs.com/profile/4289-adam/?do_eq_hovercard_qt_ data-mentionid_eq__qt_4289_qt_ href_eq__qt_http_dd_//www.html5gamedevs.com/profile/4289-adam/_qt_ rel_eq__qt__qt__gt_@adam_lt_/a_gt_ _t_s PG relying on alignment is certainly _qt_the recommended_qt_ way to go for such thing_co_ but the other way _lt_a contenteditable_eq__qt_false_qt_ data-ipshover_eq__qt__qt_ data-ipshover-target_eq__qt_http_dd_//www.html5gamedevs.com/profile/8420-royibernthal/?do_eq_hovercard_qt_ data-mentionid_eq__qt_8420_qt_ href_eq__qt_http_dd_//www.html5gamedevs.com/profile/8420-royibernthal/_qt_ rel_eq__qt__qt__gt_@royibernthal_lt_/a_gt_ is trying should work too! I_t_ll take a look asap today.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tI have to make positioning reliable in all cases and make sure it doesn_t_t conflict with absolute position and lastly make things clear enough to state some simple ground rules for everybody to understand everything as quickly as possible. And I agree that so far I_t_m not there yet...\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Nockawa","Date":"2016-09-01T07:16:39Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tOk guys_co_ I have the final conclusion to this issue!\n_lt_/p_gt_\n\n_lt_p_gt_\n\tThere was a bug in the Global Transformation matrix computation_co_ it wasn_t_t trigger in your specific case_co_ which was the reason why your text wasn_t_t _qt_moving_qt_.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tIt_t_s completely fine to use the very first PG you gave with _dd_\n_lt_/p_gt_\n\n_lt_pre_gt_\n_lt_code_gt_textField.x _eq_ -textField.width / 2_sm__lt_/code_gt__lt_/pre_gt_\n\n_lt_p_gt_\n\tbecause if you don_t_t specify a size for your text object_co_ it will take the size of the text itself_co_ which is what you want.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tThere was just an issue that prevent this change of position to update the global transformation_co_ I_t_m going to make the bug fix and merge the PR right away so you can have the latest version_co_ but the PG itself will be update when DK will be able to.\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"}]