ui/gesture: add Scroll.State method

And move Click.State to a method.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-08-11 18:15:59 +02:00
parent 5d28f9e690
commit 40091c5918
3 changed files with 57 additions and 21 deletions
+1 -1
View File
@@ -87,7 +87,7 @@ func (l *List) Init(cfg ui.Config, q input.Queue, ops *ui.Ops, cs Constraints, l
// Dragging reports whether the List is being dragged.
func (l *List) Dragging() bool {
return l.scroll.Dragging()
return l.scroll.State() == gesture.StateDragging
}
func (l *List) update() {