For my product demand, I have to rotate the whole page 90deg.
Then I show the main code in the follow page：
when the browser height more than the browser width（or just view on the phone browser，the panleft、panright、panup and pandown events don’t work correctly。If you do not understand the events I described, this is the corresponding in hammer.js
And this is the normal page for compare:
I want to make the direction of the event consistent with the direction of the canvas，not the window。
And how to adjust to slove？