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

Defining pinch bounds #12

Open
Dorkside opened this issue Apr 2, 2022 · 1 comment
Open

Defining pinch bounds #12

Dorkside opened this issue Apr 2, 2022 · 1 comment

Comments

@Dorkside
Copy link

Dorkside commented Apr 2, 2022

Tried several ways of defining pinch bounds but none seem to work.

usePinch(pinchHandler, {
  domTarget: rootNode,
  eventOptions: {
    passive: false,
    distanceBounds: {max: 1000, min: -900}
  },
})

Is this supposed to constrain the value inside of da ?

@Dorkside
Copy link
Author

Dorkside commented Apr 2, 2022

Found a solution :

const p = usePinch(pinchHandler, {
  domTarget: rootNode,
  eventOptions: {
    passive: false
  },
});

p.config.pinch.bounds[0] = [-900, 1000]

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