Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

climbing: Change image quality by zooming #360

Merged
merged 2 commits into from
Jul 12, 2024

Conversation

jvaclavik
Copy link
Collaborator

No description provided.

Copy link

vercel bot commented Jun 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
osmapp ✅ Ready (Inspect) Visit Preview Jul 12, 2024 6:54am

@@ -4,7 +4,7 @@ import SplitPane from 'react-split-pane';
import ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole file needs some refactoring, will be done in different PR.

@@ -1,5 +1,6 @@
export const getContainedSizeImage = (image) => {
const ratio = image.naturalWidth / image.naturalHeight;
const ratio =
image.naturalHeight === 0 ? 0 : image.naturalWidth / image.naturalHeight;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was causing really weird visual glitch with width because it was NaN

@jvaclavik jvaclavik merged commit 3fe4f42 into master Jul 12, 2024
2 checks passed
@jvaclavik jvaclavik deleted the climbing-zoom-change-image-quality branch July 12, 2024 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant