Skip to content

Commit 144097e

Browse files
committed
Fix an issue with repeated zooming to points
1 parent b02a08c commit 144097e

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## v1.6.3
2+
3+
- Fix an issue with repeated zooming to points
4+
15
## v1.6.2
26

37
- Fix a build regression from updating to Rollup v3

src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2358,7 +2358,9 @@ const createScatterplot = (
23582358
const target = [rect.x + rect.width / 2, rect.y + rect.height / 2];
23592359

23602360
// Vertical field of view
2361-
const vFOV = 2 * Math.atan(1 / camera.view[5]);
2361+
// The Arc Tangent is based on the original camera position. Otherwise
2362+
// we would have to do `Math.atan(1 / camera.view[5])`
2363+
const vFOV = 2 * Math.atan(1);
23622364

23632365
const distance =
23642366
rect.height * viewAspectRatio > rect.width

0 commit comments

Comments
 (0)