Skip to content

Add PointerScaleEvent and use in InteractiveViewer#112172

Merged
justinmc merged 2 commits into
flutter:masterfrom
moffatman:web_scale
Oct 5, 2022
Merged

Add PointerScaleEvent and use in InteractiveViewer#112172
justinmc merged 2 commits into
flutter:masterfrom
moffatman:web_scale

Conversation

@moffatman

@moffatman moffatman commented Sep 22, 2022

Copy link
Copy Markdown
Contributor

Add new type of PointerSignal, and handle it within InteractiveViewer. For use in trackpad pinch-to-zoom where full gesture information is unavailable (web).

Part of #112103

Sequence

  1. ui.PointerSignalKind forwards compatibility for scale #112170
  2. Add discrete scale pointer signal flutter-team-archive/engine#36342
  3. This PR
  4. Send PointerSignalKind.scale events from web flutter-team-archive/engine#36348

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • All existing and new tests are passing.

@flutter-dashboard flutter-dashboard Bot added a: tests "flutter test", flutter_test, or one of our tests f: gestures flutter/packages/flutter/gestures repository. framework flutter/packages/flutter repository. See also f: labels. labels Sep 22, 2022
@HansMuller
HansMuller requested a review from justinmc September 23, 2022 21:59

@justinmc justinmc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all the InteractiveViewer improvements. This seems reasonable to me. I'll review the engine PR and then come back to this when it's merged. I want to try this on my machine locally once that's merged too.

Comment thread packages/flutter/lib/src/gestures/events.dart Outdated
Comment thread packages/flutter/lib/src/gestures/events.dart Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are some of these parameters not used?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess PointerPanZoomUpdateEvent.copyWith is doing the same thing below.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The signature has to match PointerEvent.copyWith, but most parameters are not relevant

Comment thread packages/flutter/lib/src/widgets/interactive_viewer.dart Outdated
Comment thread packages/flutter/test/widgets/interactive_viewer_test.dart Outdated
@goderbauer
goderbauer requested a review from justinmc October 4, 2022 22:11

@justinmc justinmc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@justinmc
justinmc merged commit 850f3b3 into flutter:master Oct 5, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 6, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Oct 6, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Oct 6, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: tests "flutter test", flutter_test, or one of our tests f: gestures flutter/packages/flutter/gestures repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants