I am creating a touch screen web application that requires a screen rotation feature. It's easy to rotate everything using CSS conversion, and works on most pages. The problem is that there is a Mapbox type plugin that uses mouse events, the position of the events is still relative to the view port. For example, after I rotated <body>180 degrees and clicked the top left of the map, which is located at the bottom right of the browser, mapbox will think that I clicked at the bottom right of the map. Same with drag and drop, it just moved the map in the opposite direction.
Is there a better way to rotate an entire page, including all mouse events? Or is there a way around it like automatically replacing the coordinates of mouse events based on rotation?
source
share