forked from tslocum/cview
feat(flex): Add `GetDirection`
This commit is contained in:
parent
2eac84df0b
commit
85bc397af2
8
flex.go
8
flex.go
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue