Add delta param to scaleupdate so it matches dragupdate#85009
Add delta param to scaleupdate so it matches dragupdate#85009fluttergithubbot merged 2 commits intoflutter:masterfrom
Conversation
|
CC @marcglasberg as this was an old request of yours. |
| /// receiver since the previous update. | ||
| /// | ||
| /// Defaults to zero if not specified in the constructor. | ||
| final Offset delta; |
There was a problem hiding this comment.
nit: should this be added to toString?
There was a problem hiding this comment.
What does "pointer" refer to in the doc? Shouldn't a scale gesture have 2 pointers? From the implementation, it should be the position change of the focal point?
There was a problem hiding this comment.
Thanks for this, I should have waited for your review. You already saw my new PR but for the record it's at #85718.
| localFocalPoint: PointerEvent.transformPosition(_lastTransform, _currentFocalPoint), | ||
| rotation: _computeRotationFactor(), | ||
| pointerCount: _pointerQueue.length, | ||
| delta: _currentFocalPoint - _initialFocalPoint, |
There was a problem hiding this comment.
The doc says delta will be in the coordinate space of the event receiver but here it looks like these 2 are pre-transformed (global) coordinates (because there's a localFocalPoint that has a different value)?
|
@justinmc Thanks for pinging me. I appreciate it.
|

ScaleUpdateDetails is supposed to be a superset of DragUpdateDetails, but it is missing the
deltaparam. This PRs adds it.Closes #43833