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

Add image reset button to reset zoom, rotation and position #10356

Merged
merged 8 commits into from
Jan 18, 2024

Conversation

AlexAndBear
Copy link
Contributor

@AlexAndBear AlexAndBear commented Jan 17, 2024

Description

Related Issue

Motivation and Context

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests
  • Documentation
  • Maintenance (e.g. dependency updates or tooling)

Open tasks:

  • ...

Copy link

update-docs bot commented Jan 17, 2024

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@@ -97,5 +130,6 @@ export default defineComponent({
img {
max-width: 80%;
max-height: 80%;
cursor: move;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was oddly necessary, as panzoom looses the cursor representation while rotating the image

unref(panzoom)?.destroy()
}

// wait for next tick until image is rendered
await nextTick()

panzoom.value = Panzoom(unref(img) as any, {
animate: true,
animate: false,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

disabled, they look off when rotating a panned image

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions

31.25% Condition Coverage on New Code (required ≥ 50%)

See analysis details on SonarCloud

Copy link
Contributor

@lookacat lookacat left a comment

Choose a reason for hiding this comment

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

LGTM, seems to work fine 👍🏼

@AlexAndBear AlexAndBear merged commit 7cd6246 into stable-8.0 Jan 18, 2024
1 check failed
@delete-merged-branch delete-merged-branch bot deleted the issues/9840 branch January 18, 2024 10:44
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