Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/infinite-viewer/src/InfiniteViewerManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ class InfiniteViewer extends EventEmitter<InfiniteViewerEvents> {
const pinchDirection = options.pinchDirection;
const maxPinchWheel = options.maxPinchWheel || Infinity;

const isKeydown = e[`${this.wheelPinchKey}Key`] || e.ctrlKey;
const isKeydown = this.wheelPinchKey === null ? true : e[`${this.wheelPinchKey}Key`] || e.ctrlKey;

if (options.useWheelPinch && isKeydown) {
let deltaY = e.deltaY;
Expand Down
4 changes: 2 additions & 2 deletions packages/infinite-viewer/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ export interface InfiniteViewerOptions {
*/
useWheelPinch: boolean;
/**
* Key to use wheel pinch
* Key to use wheel pinch. Null if you want wheel pinch without any key.
* @default "ctrl"
*/
wheelPinchKey: "ctrl" | "meta" | "alt" | "shift",
wheelPinchKey: "ctrl" | "meta" | "alt" | "shift" | null,
/**
* Whether to use wheel scroll. You can scroll smoothly by using the wheel.
* @default IS_SAFARI
Expand Down