Skip to content

Commit bd1293e

Browse files
committed
fix issue 3425 do not default to turntable when z is zero
1 parent a956a22 commit bd1293e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/plots/gl3d/layout/defaults.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ function handleGl3dDefaults(sceneLayoutIn, sceneLayoutOut, coerce, opts) {
128128
var y = sceneLayoutIn.camera.up.y;
129129
var z = sceneLayoutIn.camera.up.z;
130130

131-
if(!x || !y || !z) {
131+
if((!x && x !== 0) || (!y && y !== 0) || (!z && z !== 0)) {
132132
dragmode = 'turntable';
133-
} else if(z / Math.sqrt(x * x + y * y + z * z) > 0.999) {
133+
} else if(z !== 0 && z / Math.sqrt(x * x + y * y + z * z) > 0.999) {
134134
dragmode = 'turntable';
135135
}
136136
} else {

0 commit comments

Comments
 (0)