Skip to content
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

Address problems with KeyboardDragListener options #1635

Closed
jessegreenberg opened this issue Jun 3, 2024 · 1 comment
Closed

Address problems with KeyboardDragListener options #1635

jessegreenberg opened this issue Jun 3, 2024 · 1 comment
Assignees

Comments

@jessegreenberg
Copy link
Contributor

A couple of problems identified while working on #1614

  • There are some option differences between KeyboardDragListener and DragListener that are making practical use of Combine DragListener and KeyboardDragListener into a single class #1614 difficult. For example modelDelta (DragListener) is called vectorDelta in KeyboardDragListener.
  • KeyboardDragListener doesn't support translateNode.
  • The delta provided by KeyboardDragListener is not available if you don't provide a positionProperty and use drag callback directly instead.

Lets clean these things up and make the API for DragListener and KeyboardDragListener more similar. This will make it easier to use RichDragListener.

@jessegreenberg jessegreenberg self-assigned this Jun 3, 2024
jessegreenberg added a commit to phetsims/area-model-common that referenced this issue Jun 3, 2024
jessegreenberg added a commit to phetsims/density-buoyancy-common that referenced this issue Jun 3, 2024
jessegreenberg added a commit to phetsims/faradays-law that referenced this issue Jun 3, 2024
jessegreenberg added a commit to phetsims/gas-properties that referenced this issue Jun 3, 2024
jessegreenberg added a commit to phetsims/quadrilateral that referenced this issue Jun 3, 2024
jessegreenberg added a commit to phetsims/geometric-optics that referenced this issue Jun 3, 2024
jessegreenberg added a commit to phetsims/scenery-phet that referenced this issue Jun 3, 2024
jessegreenberg added a commit to phetsims/ph-scale that referenced this issue Jun 3, 2024
@jessegreenberg
Copy link
Contributor Author

The fields and options are better aligned. I also made it more clear how deltas are applied in the drag action and fixed how translateNode works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant