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
有办法切换图片的时候 保持原本的缩放和移动吗? #11
Labels
enhancement
New feature or request
Comments
这很难,因为有很多计算需要依赖 contentSize,也就是加载到内存的图片的尺寸,contentSize 改变了就必须要重置所有的缩放信息 你可以尝试将现在组件的源码复制一份,然后将 contentSize 设置为 和 containerSize 一样,看看效果 另外我想知道你是什么样的业务场景会有这样的需求 |
场景就是,一开始用户点进去是这个图片的缩略图,清晰度不是很高,然后用户双指放大的时候,自动加载原图,然后无感替换缩略图,所以想要保持原本的缩放和移动,实现无感替换。
原图设置上去后,再手动修改缩放和偏移能实现不?
…------------------ 原始邮件 ------------------
发件人: "panpf/zoomimage" ***@***.***>;
发送时间: 2023年12月12日(星期二) 下午2:43
***@***.***>;
***@***.******@***.***>;
主题: Re: [panpf/zoomimage] 有办法切换图片的时候 保持原本的缩放和移动吗? (Issue #11)
这很难,因为有很多计算需要依赖 contentSize,也就是加载到内存的图片的尺寸,contentSize 改变了就必须要重置所有的缩放信息
你可以尝试将现在组件的源码复制一份,然后将 contentSize 设置为 和 containerSize 一样,看看效果
另外我想知道你是什么样的业务场景会有这样的需求
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
你的想法很难实现,你只能按我刚才说的办法试试了 |
这个代码是可以保持前后两张图的 看上去没有区别的,直接用原来的transformState替换到新的上。
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
想实现个效果,先展示的缩略图,用户双指放大后自动加载原图,能做到原图加载设置好后,还保持之前的缩放和移动吗?
The text was updated successfully, but these errors were encountered: