Skip to content

Commit

Permalink
fix: do not capture wheel when pan and zoom disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
benoj authored and markmcdowell committed Jun 16, 2021
1 parent c0f0556 commit 357383b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/core/src/EventCapture.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,12 @@ export class EventCapture extends React.Component<EventCaptureProps, EventCaptur
};

public handleWheel = (e: React.WheelEvent) => {
const { onPan, zoom, onZoom } = this.props;
const { pan, onPan, zoom, onZoom } = this.props;

if (!pan && !zoom) {
return;
}

const { panInProgress } = this.state;

const yZoom = Math.abs(e.deltaY) > Math.abs(e.deltaX) && Math.abs(e.deltaY) > 0;
Expand Down

0 comments on commit 357383b

Please sign in to comment.