ctrl zoom feature
This commit is contained in:
parent
b89a3429ba
commit
31f58ade96
@ -396,7 +396,15 @@ OV.Navigation = class
|
||||
|
||||
let moveDiff = this.mouse.GetMoveDiff ();
|
||||
let mouseButton = this.mouse.GetButton ();
|
||||
if (mouseButton === 1) {
|
||||
if (mouseButton === 1 && ev.ctrlKey) {
|
||||
let params = ev || window.event;
|
||||
let delta = -params.movementY / 40;
|
||||
let ratio = 0.01;
|
||||
if (delta < 0) {
|
||||
ratio = ratio * -1.0;
|
||||
}
|
||||
this.Zoom(ratio);
|
||||
} else if (mouseButton === 1) {
|
||||
let orbitRatio = 0.5;
|
||||
this.Orbit (moveDiff.x * orbitRatio, moveDiff.y * orbitRatio);
|
||||
} else if (mouseButton === 2 || mouseButton === 3) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user