Skip to content

Commit

Permalink
feat(zoom-scroll): add zoom by cmd + wheel on mac
Browse files Browse the repository at this point in the history
  • Loading branch information
webkadiz committed Oct 3, 2023
1 parent 752fc46 commit 3ff426d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/navigation/zoomscroll/ZoomScroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ import {
log10
} from '../../util/Math';

import {
isMac
} from '../../util/Platform';

import {
bind
} from 'min-dash';
Expand Down Expand Up @@ -123,7 +127,7 @@ ZoomScroll.prototype._handleWheel = function handleWheel(event) {
// pinch to zoom is mapped to wheel + ctrlKey = true
// in modern browsers (!)

var isZoom = event.ctrlKey;
var isZoom = event.ctrlKey || (isMac() && event.metaKey);

var isHorizontalScroll = event.shiftKey;

Expand Down

0 comments on commit 3ff426d

Please sign in to comment.