Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.

Commit e61dfea

Browse files
committed
fix scroll event bug (change delta => scrollDelta to fetch the correct scroll movement info)
1 parent 9992941 commit e61dfea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Runtime/gestures/monodrag.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ public override void addAllowedPointer(PointerDownEvent evt) {
9595
protected override void handleEvent(PointerEvent evt) {
9696
D.assert(this._state != _DragState.ready);
9797
if (evt is PointerScrollEvent) {
98-
Offset delta = evt.delta;
98+
var scrollEvt = (PointerScrollEvent) evt;
99+
Offset delta = scrollEvt.scrollDelta;
99100
if (this.onUpdate != null) {
100101
this.invokeCallback<object>("onUpdate", () => {
101102
this.onUpdate(new DragUpdateDetails(

0 commit comments

Comments
 (0)