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

more zoom levels and more powerful zoom in on goal graph #539

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

krugerk
Copy link
Contributor

@krugerk krugerk commented Dec 3, 2024

Summary

Via double tap on the goal's graph, step through the zoom levels.

One could double tap on the goal's graph to see a zoomed in version. This was at 2x magnification. Now it goes to 7x and from 1x to 3x to 5x and then 7x.

The graph (wrapped still inside a scrollview) still supports the pan to zoom. This zoom's max has also been bumped with this MR.

Validation

Ran the app in the iPhone simulator. Tapped and zoomed on some graphs.

let possibleNextStepUp = self.goalImageScrollView.zoomScale + 2.0
let nextZoomLevel = possibleNextStepUp <= self.goalImageScrollView.maximumZoomScale ? possibleNextStepUp : self.goalImageScrollView.minimumZoomScale

self.goalImageScrollView.setZoomScale(nextZoomLevel, animated: true)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems reasonable for iPhone. I'm less sure it makes sense for iPad though? Perhaps the max zoom level should be a function of the screen size?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I still found it quite OK to double tap to zoom on the iPad. The bigger issue for me was that the graph image being used quickly becomes blurry since we are using the lower resolution png rather than the svg. The user can still pinch-to-zoom and can do so at the previous level as well as now also at other levels.

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.

2 participants