Closed edemaine closed 3 years ago
In https://github.com/edemaine/cocreate/issues/131#issuecomment-741971618, @edemaine asked:
Could you test PR #134 to make sure it doesn't break/change anything on the MacOS side, with regular wheeling, shift-wheel, ctrl-wheeling, and ctrl-shift-wheeling? (I imagine not, given the data you report above, but doesn't hurt to double-check.) On Windows, it now gives me the desired behavior: regular wheel is vertical, shift-wheel is horizontal, ctrl- and ctrl-shift-wheeling zooms.
I checked on MacOS with mouse wheel, in Chrome, Safari, and Firefox; and on a Chromebook with touchpad. In every browser, mouse wheel worked as expected with shift- and ctrl-. The combination of shift-ctrl-wheel does nothing. But, I think this doesn't matter too much — most people will only use wheel, shift-wheel, or ctrl-wheel. I think shift-ctrl-wheel is not an expected behavior.
Sounds good — many thanks for testing!
This should fix #131. MacOS seems to do this conversion automatically (hence the
deltaX == 0
check) but Windows doesn't, so we manually convert purely vertical wheel events into purely horizontal ones whenshiftKey
is set.