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

feature/strictscale: add possibility to restrict user scale, fix issue #85 #537

Merged
merged 1 commit into from
May 17, 2023

Conversation

EArminjon
Copy link
Contributor

Actual behavior :
User can scale image in or out. When user release scale gesture, app will rescale if current user scale choice is behind defined limit (maxScale and minScale).

Proposition :
A new property to prevent the user to scale behind theses limit.

@EArminjon EArminjon changed the title feature/strictscale feature/strictscale: add possibility to restrict user scale May 10, 2023
@EArminjon EArminjon force-pushed the feature/strictscale branch from 3ed92df to 21b1e91 Compare May 10, 2023 14:31
@EArminjon
Copy link
Contributor Author

Ready

@EArminjon EArminjon changed the title feature/strictscale: add possibility to restrict user scale feature/strictscale: add possibility to restrict user scale, fix issue #85 May 12, 2023
@EArminjon
Copy link
Contributor Author

@renancaraujo can you take a look please :'( ?

@renancaraujo
Copy link
Member

We have wey too many proeprties on those widgets, we will have to do a cleanup eventually

@renancaraujo renancaraujo merged commit d2865d3 into bluefireteam:main May 17, 2023
@EArminjon
Copy link
Contributor Author

EArminjon commented May 23, 2023

@renancaraujo do you plan to release soon this PR on pub dev :) ?

@EArminjon
Copy link
Contributor Author

EArminjon commented May 24, 2023

@renancaraujo seems like the auto deployment didn't push the new version on pub dev. Do you plan it soon :'( ?

@EArminjon
Copy link
Contributor Author

@renancaraujo please :'(

@EArminjon
Copy link
Contributor Author

@renancaraujo ?

@EArminjon EArminjon deleted the feature/strictscale branch June 5, 2023 12:33
@phamconganh
Copy link

phamconganh commented Jun 15, 2023

@EArminjon strictScale makes it impossible to scale back to minScale. Example: minScale 1, but only zoomOut to 1.0043980003016804. I think clamp newScale and update if different from previous scale at line code:

    if (widget.strictScale && (newScale > widget.scaleBoundaries.maxScale ||
        newScale < widget.scaleBoundaries.minScale)) {
      return;
    }

@EArminjon
Copy link
Contributor Author

@EArminjon strictScale makes it impossible to scale back to minScale. Example: minScale 1, but only zoomOut to 1.0043980003016804. I think clamp newScale and update if different from previous scale at line code:

    if (widget.strictScale && (newScale > widget.scaleBoundaries.maxScale ||
        newScale < widget.scaleBoundaries.minScale)) {
      return;
    }

Create an issue with reproductible steps please. Commenting merged PR is not a good practice.

MagTuxGit added a commit to MagTuxGit/photo_view that referenced this pull request May 6, 2024
* master_remote:
  chore: 0.15.0 (bluefireteam#553)
  Added pageSnapping option (bluefireteam#542)
  feature/strictscale: add possibility to restrict user scale, fix issue bluefireteam#85 (bluefireteam#537)
  make scale more smoothly (bluefireteam#450)
  Pass through semanticLabel (bluefireteam#530)
  doc: Fix github build badge (bluefireteam#531)
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.

3 participants