gesture icon indicating copy to clipboard operation
gesture copied to clipboard

Defining pinch bounds

Open Dorkside opened this issue 2 years ago • 1 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 ?

Dorkside avatar Apr 02 '22 16:04 Dorkside

Found a solution :

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

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

Dorkside avatar Apr 02 '22 16:04 Dorkside