-
Notifications
You must be signed in to change notification settings - Fork 168
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
Conversation
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; |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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
|
There was a problem hiding this 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 👍🏼
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Open tasks: