vueuse / gesture

🕹 Vue Composables making your app interactive

Home Page:https://gesture.vueuse.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Defining pinch bounds

Dorkside opened this issue · comments

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 ?

Found a solution :

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

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