Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e489a72

Browse files
committed
Remove zoomspeed parameter
1 parent 394014e commit e489a72

File tree

5 files changed

+2
-15
lines changed

5 files changed

+2
-15
lines changed

src/components/fx/layout_attributes.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,6 @@ module.exports = {
3131
'3D scenes.'
3232
].join(' ')
3333
},
34-
zoomspeed: {
35-
valType: 'number',
36-
role: 'info',
37-
dflt: 1,
38-
min: 0,
39-
editType: 'none',
40-
description: [
41-
'Sets the speed at which the mouse wheel zooms the plot. Larger',
42-
'values are faster.'
43-
].join(' ')
44-
},
4534
hovermode: {
4635
valType: 'enumerated',
4736
role: 'info',

src/components/fx/layout_defaults.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
1717
}
1818

1919
coerce('dragmode');
20-
coerce('zoomspeed');
2120

2221
var hovermodeDflt;
2322
if(layoutOut._has('cartesian')) {

src/plots/cartesian/dragbox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) {
380380
return;
381381
}
382382

383-
var zoom = Math.exp(-Math.min(Math.max(wheelDelta, -20), 20) / 100 * fullLayout.zoomspeed),
383+
var zoom = Math.exp(-Math.min(Math.max(wheelDelta, -20), 20) / 100),
384384
gbb = mainplot.draglayer.select('.nsewdrag')
385385
.node().getBoundingClientRect(),
386386
xfrac = (e.clientX - gbb.left) / gbb.width,

src/plots/gl2d/camera.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ function createCamera(scene) {
262262
var lastX = result.lastPos[0],
263263
lastY = result.lastPos[1];
264264

265-
var scale = Math.exp(scene.fullLayout.zoomspeed * 10.0 * dy / (viewBox[3] - viewBox[1]));
265+
var scale = Math.exp(10.0 * dy / (viewBox[3] - viewBox[1]));
266266

267267
var cx = lastX /
268268
(viewBox[2] - viewBox[0]) * (dataBox[2] - dataBox[0]) +

src/plots/gl3d/scene.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ function initializeGLPlot(scene, fullLayout, canvas, gl) {
205205
center: [cameraData.center.x, cameraData.center.y, cameraData.center.z],
206206
eye: [cameraData.eye.x, cameraData.eye.y, cameraData.eye.z],
207207
up: [cameraData.up.x, cameraData.up.y, cameraData.up.z],
208-
zoomSpeed: fullLayout.zoomspeed,
209208
zoomMin: 0.1,
210209
zoomMax: 100,
211210
mode: 'orbit'

0 commit comments

Comments
 (0)