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

Nav minimap can't drag properly #624

Open
linonetwo opened this issue Jul 14, 2023 · 0 comments
Open

Nav minimap can't drag properly #624

linonetwo opened this issue Jul 14, 2023 · 0 comments

Comments

@linonetwo
Copy link

linonetwo commented Jul 14, 2023

When drag on minimap, the drag delta xy is calculated from the distance from the origin dragstart event point, so it feels like it is drifting. Caused by hammerjs/hammer.js#806

Current workaround #623 (comment)

      const speedupFactorX = this.props.viewrectangle[2] / this.props.width * 2;
      const speedupFactorY = this.props.viewrectangle[3] / this.props.height * 2;

Note that the 2 magic number here is what I test suit for my app size. I thought this.props.viewrectangle[2] / this.props.width is enough, but it is not, don't know why...

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

No branches or pull requests

1 participant