dicom-microscopy-viewer icon indicating copy to clipboard operation
dicom-microscopy-viewer copied to clipboard

Disable image rotation from Mobile Devices

Open biharck opened this issue 6 years ago • 1 comments

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.

biharck avatar Apr 01 '19 11:04 biharck

P.S. To emulate the rotation over the laptop you can use alt+shift+mouse action

biharck avatar Apr 01 '19 11:04 biharck