-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Add delta param to scaleupdate so it matches dragupdate #85009
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
CC @marcglasberg as this was an old request of yours. |
Piinks
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /// receiver since the previous update. | ||
| /// | ||
| /// Defaults to zero if not specified in the constructor. | ||
| final Offset delta; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: should this be added to toString?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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