feat(flex): Add `GetDirection`

This commit is contained in:
Andreas Bieber 2020-09-16 13:26:56 +02:00
parent 2eac84df0b
commit 85bc397af2
1 changed files with 8 additions and 0 deletions

View File

@ -58,6 +58,14 @@ func NewFlex() *Flex {
return f
}
// GetDirection returns the direction in which the contained primitives are
// distributed. This can be either FlexColumn (default) or FlexRow.
func (f *Flex) GetDirection() int {
f.l.RLock()
defer f.l.RUnlock()
return f.direction
}
// SetDirection sets the direction in which the contained primitives are
// distributed. This can be either FlexColumn (default) or FlexRow.
func (f *Flex) SetDirection(direction int) *Flex {