dicom-microscopy-viewer
dicom-microscopy-viewer copied to clipboard
Disable image rotation from Mobile Devices
The current bootstrap style allows users to pinch zoom and rotate the screen but sometimes is annoying when users are drawing geometric such as Polygons, where the geometry is composed by multiple points and by mistake users, could rotate the screen.
There are some related topics over StackOverflow about the same thing:
const controls = ol.control.defaults({rotate: false});
const interactions = ol.interaction.defaults({altShiftDragRotate:false, pinchRotate:false});
const map = new ol.Map {
controls: controls,
interactions: interactions
};
and
view: new ol.View({ ... enableRotation: false })
But none of them worked properly.
P.S. To emulate the rotation over the laptop you can use alt+shift+mouse action