From 9098e08acd1901e6cbd6d751e8313c0312c85598 Mon Sep 17 00:00:00 2001 From: Jonathan Olson Date: Mon, 24 Jun 2024 11:29:42 -0600 Subject: [PATCH] origin doc improvements --- doc/layout.html | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/doc/layout.html b/doc/layout.html index 6b7b915aa..6f8dd4ddd 100644 --- a/doc/layout.html +++ b/doc/layout.html @@ -937,6 +937,13 @@

align

details

+

+ For the 'origin' align, it is useful to note that the origin is at the top-left of the rectangles, + at the center of circles, and at the left of the baseline of text. For the above example of an HBox, the align + will control the vertical positioning of Nodes, and thus will only care about the Y component of the origin. + It places the origin of all of the Nodes at the same Y value (top of rectangles, center of circles, baseline of text). +

+

justifyLines

justifyLines controls how lines are positioned along the secondary axis (null will default to a @@ -2214,8 +2221,8 @@

layoutOptions

layoutOrigin

- FlowBox/GridBox typically lay out content so that the origin (0,0) is at the upper-left. There are some exceptions - to this. + FlowBox/GridBox will typically lay out content so that the origin (0,0) of the FlowBox/GridBox is at the upper-left. + There are some exceptions to this.

The default behavior:

@@ -2243,7 +2250,13 @@

layoutOrigin

- When using align: origin, the origin of the entire FlowBox will be at the origin of the first line: + When using align: origin, the Y-origin of the entire FlowBox will be at the Y-origin of the first wrapped line of Nodes. +

+ +

+ NOTE: The origin of the Circle nodes below is at the center of the Circle. The origin of the Text nodes below + (created by bigText/normalText) is the left end of the baseline of the text (since the word + "Text" doesn't have any descenders, this will be at the bottom).