Skip to content

Commit

Permalink
Make sure globe radius is minimum 1
Browse files Browse the repository at this point in the history
  • Loading branch information
simonlc committed Dec 14, 2023
1 parent 6245cab commit 3bcda2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Globe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function Globe({ size, country, initialRotation, rotation }) {
const cx = width / 2;
const cy = height / 2;

const initialScale = Math.min(size.width, size.height) / 2 - 10;
const initialScale = Math.max(Math.min(size.width, size.height) / 2 - 10, 1);
const maxScroll = 20;
const minScroll = 0.3;
const sensitivity = 75;
Expand Down

0 comments on commit 3bcda2c

Please sign in to comment.