Pegboard defaults to FlowVertical layout

This commit is contained in:
Sasha Koshka 2024-09-12 18:11:08 -04:00
parent c30ac90577
commit a3bb4098fb

View File

@ -12,9 +12,9 @@ type Pegboard struct {
}
// NewPegboard creates a new pegboard. If the provided layout is nil, it will
// use a FlowHorizontal layout.
// use a FlowVertical layout.
func NewPegboard (layout tomo.Layout, children ...tomo.Object) *Pegboard {
if layout == nil { layout = layouts.FlowHorizontal }
if layout == nil { layout = layouts.FlowVertical }
pegboard := &Pegboard { }
pegboard.init(layout, children...)
pegboard.box.SetRole(tomo.R("objects", "Pegboard"))