Skip to content

Provide a reset or recenter function #34

@ebabcock1

Description

@ebabcock1

While the parameter autoReturnToCenter=false is handy for preserving the joystick position, I would like the ability to force the joystick to return to center, or even to a specific position. I am using a joystick to control multiple robot joints, one at a time (as there isn't enough real estate to display multiple joysticks), and would like to restore the joystick position after switching the joint the joystick is controlling.

I would like to see a function (or more) called reset(), returnToCenter(), or setPosition(x,y) that would set the joystick to the initial (center) position or a specific position. I would call such a function when switching controls.

Since the joystick position is read-only, there is no way to change it. I could destroy the joystick and recreate it, but that seems wasteful, I could also use hidden elements for multiple joysticks, but just complicates the user interface.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions