Skip to content

Commit 6097f76

Browse files
committed
debugui: bug fix: pointingDelta should return (0, 0) for a new touch
Closes #45
1 parent e1125f6 commit 6097f76

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

widget.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ func (c *Context) pointingOver(bounds image.Rectangle) bool {
6363
}
6464

6565
func (c *Context) pointingDelta() image.Point {
66+
// The delta is always (0, 0) when a touch just started.
67+
if c.pointing.isTouchActive() && c.pointing.justPressed() {
68+
return image.Point{}
69+
}
6670
return c.pointingPosition().Sub(c.lastPointingPos)
6771
}
6872

0 commit comments

Comments
 (0)