Skip to content

Commit 9de2fd1

Browse files
committed
testing interactions and controls to disable rotation
1 parent 47b9012 commit 9de2fd1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/api.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,9 @@ class VLWholeSlideMicroscopyImageViewer {
560560
});
561561
}
562562

563+
const interactions = ol.interaction.defaults({altShiftDragRotate:false, pinchRotate:false});
564+
const controls = ol.control.defaults({rotate: false});
565+
563566
/*
564567
* Creates the map with the defined layers and view and renders it via
565568
* WebGL.
@@ -569,7 +572,8 @@ class VLWholeSlideMicroscopyImageViewer {
569572
layers: [imageLayer, this[_drawingLayer]],
570573
view: view,
571574
controls: [],
572-
enableRotation: false,
575+
interactions: interactions,
576+
controls: controls,
573577
loadTilesWhileAnimating: true,
574578
loadTilesWhileInteracting: true,
575579
logo: false
@@ -580,7 +584,8 @@ class VLWholeSlideMicroscopyImageViewer {
580584
layers: [imageLayer, this[_drawingLayer]],
581585
view: view,
582586
controls: [],
583-
enableRotation: false,
587+
interactions: interactions,
588+
controls: controls,
584589
loadTilesWhileAnimating: true,
585590
loadTilesWhileInteracting: true,
586591
logo: false

0 commit comments

Comments
 (0)