Skip to content

Commit 344c048

Browse files
committed
fix: Change modified keys for wheel actions
Since 2021-09 it has become the unofficial standard to send pinch events on touchpads as wheel events with the ctrl key held down. This should correspond to zoom. GeoJS actions predate this and had used ctrl+wheel as rotate (and wheel by itself as zoom). This changes it so shift+wheel is rotate, and wheel+(no shift) regardless of ctrl state is zoom.
1 parent cc205a2 commit 344c048

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mapInteractor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ var mapInteractor = function (args) {
229229
}, {
230230
action: geo_action.zoom,
231231
input: 'wheel',
232-
modifiers: {shift: false, ctrl: false},
232+
modifiers: {shift: false},
233233
owner: 'geo.mapInteractor',
234234
name: 'wheel zoom'
235235
}, {
@@ -241,7 +241,7 @@ var mapInteractor = function (args) {
241241
}, {
242242
action: geo_action.rotate,
243243
input: 'wheel',
244-
modifiers: {shift: false, ctrl: true},
244+
modifiers: {shift: true, ctrl: false},
245245
owner: 'geo.mapInteractor',
246246
name: 'wheel rotate'
247247
}, {

0 commit comments

Comments
 (0)