Skip to content

Commit 171b9f4

Browse files
committed
Swapped margin definitions of DockTop and DockBottom.
1 parent 2259114 commit 171b9f4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Nu/Nu/World/WorldFacets.fs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2189,8 +2189,8 @@ type LayoutFacet () =
21892189
child.SetPositionLocal position.V3 world
21902190
child.SetSize size.V3 world
21912191
| DockTop ->
2192-
let size = v2 perimeter.Width margins.W - margin
2193-
let position = v2 0.0f (perimeterHeightHalf - margins.Z * 0.5f)
2192+
let size = v2 perimeter.Width margins.Y - margin
2193+
let position = v2 0.0f (-perimeterHeightHalf + margins.Y * 0.5f)
21942194
child.SetPositionLocal position.V3 world
21952195
child.SetSize size.V3 world
21962196
| DockRight ->
@@ -2199,8 +2199,8 @@ type LayoutFacet () =
21992199
child.SetPositionLocal position.V3 world
22002200
child.SetSize size.V3 world
22012201
| DockBottom ->
2202-
let size = v2 perimeter.Width margins.Y - margin
2203-
let position = v2 0.0f (-perimeterHeightHalf + margins.Y * 0.5f)
2202+
let size = v2 perimeter.Width margins.W - margin
2203+
let position = v2 0.0f (perimeterHeightHalf - margins.Z * 0.5f)
22042204
child.SetPositionLocal position.V3 world
22052205
child.SetSize size.V3 world
22062206
| DockLeft ->

Nu/Nu/World/WorldPrelude.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ type Layout =
289289
/// Flow children in the given direcion up to the given limit.
290290
| Flow of FlowDirection : FlowDirection * FlowLimit : FlowLimit
291291

292-
/// Dock children using the given margins.
292+
/// Dock children using the given margins (X = Left, Y = Top, Z = Right, W = Bottom).
293293
| Dock of Margins : Vector4 * PercentageBased : bool * ResizeChildren : bool
294294

295295
/// Arrange children in a grid with the given dimensions, optional flow direction, and with optional resizing behavior.

0 commit comments

Comments
 (0)