mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-22 12:32:00 +08:00
fix(editor): enable shift+wheel horizontal scroll on all platforms (#15494)
Fixes #10034
This commit is contained in:
@@ -356,7 +356,11 @@ export class EdgelessRootBlockComponent extends BlockComponent<
|
||||
}
|
||||
// pan
|
||||
else {
|
||||
const simulateHorizontalScroll = IS_WINDOWS && e.shiftKey;
|
||||
// Enable Shift+wheel horizontal scroll on Windows (no native deltaX),
|
||||
// and on any platform when using a mouse without horizontal scroll
|
||||
// (deltaX === 0 means no native horizontal input, e.g. external mouse on macOS/Linux).
|
||||
const simulateHorizontalScroll =
|
||||
e.shiftKey && (IS_WINDOWS || e.deltaX === 0);
|
||||
const dx = simulateHorizontalScroll
|
||||
? e.deltaY / viewport.zoom
|
||||
: e.deltaX / viewport.zoom;
|
||||
|
||||
Reference in New Issue
Block a user