Skip to content
This repository was archived by the owner on Sep 13, 2020. It is now read-only.
This repository was archived by the owner on Sep 13, 2020. It is now read-only.

Does not fully close when using gesture to close menu. #127

@Jpoliachik

Description

@Jpoliachik

When using a pan gesture to close the menu, it gets stuck before fully closing. See the gif below:
side-menu-issue

Messing around with code, I'm able to fix this by removing the if statement in handlePanResponderMove:

if (this.menuPositionMultiplier() *
      (this.state.left.__getValue() + gestureState.dx ) >= 0 ) {
      this.state.left.setValue(this.prevLeft + gestureState.dx);
    }

And instead just call:
this.state.left.setValue(this.prevLeft + gestureState.dx);

It seems to work, and handleMoveShouldSetPanResponder seems to weed out any unwanted pans. But I bet it breaks something else.

Can someone familiar with this project explain what that if statement is for?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions