Skip to content

Add bi-directional props to Joystick component  #16

Open

Description

@mtwichan

In cases where the joystick should only move in 2 directions (up and down only or left and right only) it would be nice to have it so the joystick only moves in the two specified directions, so users don't get confused with empty commands.

Activity

  1. yoannmoinet commented on Sep 3, 2019

    @yoannmoinet

    it's supported by nipplejs (used by dash-daq) out of the box.

  2. Karan-S-Mittal commented on Oct 23, 2021

    @Karan-S-Mittal
    Contributor

    you can now give two new props to the joystick component for the same.

    Preview

    Screen.Recording.2021-10-23.at.8.51.32.PM.mov

    Code

    This will lock the movement of stick in Y direction so you can only move it vertically.
    Joystick( label="Joystick", labelPosition="bottom", lockX=False, lockY=True ),

  3. added a commit that references this issue on Oct 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions