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

Feat/桌面模式下图片预览支持滚轮缩放与鼠标拖放 #72

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

Conversation

Memoyu
Copy link

@Memoyu Memoyu commented Oct 21, 2024

大佬,斗胆pr一下,望不要嫌弃!🤪
看着桌面端下没法缩放和拖放预览图片,故从ant blazor那抄了一个过来;🤖

@Yu-Core
Copy link
Owner

Yu-Core commented Oct 25, 2024

感谢pr,不过我更倾向于使用一个新的js库替换原本的zoom.js
不知道你是否感兴趣,难度不会很大
tragopan看着还可以,当然,如果你有更好的替代就更好了

@Memoyu
Copy link
Author

Memoyu commented Oct 27, 2024

感谢pr,不过我更倾向于使用一个新的js库替换原本的zoom.js 不知道你是否感兴趣,难度不会很大 tragopan看着还可以,当然,如果你有更好的替代就更好了

这个似乎看着更靠谱,那我直接替换😁

@Memoyu
Copy link
Author

Memoyu commented Oct 27, 2024

我在后来找到一个社区活跃度相对比较高的js库: timmywil/panzoom
感觉功能还是比较强大的,而且包也足够小。

@Yu-Core
Copy link
Owner

Yu-Core commented Oct 28, 2024

timmywil/panzoom#662 timmywil/panzoom#671 这两个问题似乎无法解决

@@ -484,29 +484,21 @@ html {
opacity: 0.5 !important;
}

.preview-image-dialog__image__wraper {
Copy link
Owner

Choose a reason for hiding this comment

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

css这里改动后,和之前的行为不一致
image

image

isInitialized = true;
}
}

private async void SetVisible(bool value)
protected override async Task InternalVisibleChanged(bool value)
Copy link
Owner

Choose a reason for hiding this comment

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

此处最好还是用之前的方法,改动后会导致安卓返回键返回一次后无法再返回,我也不知道为什么

Copy link
Owner

Choose a reason for hiding this comment

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

使用新的js库,文件夹名也应该改变

@Yu-Core
Copy link
Owner

Yu-Core commented Nov 5, 2024

不好意思,请问有什么进展吗?#72 (comment)
另外,我不太明白css有什么改的必要

@Memoyu
Copy link
Author

Memoyu commented Nov 5, 2024

不好意思,请问有什么进展吗?#72 (comment) 另外,我不太明白css有什么改的必要

在项目中这两个问题并没有影响正常功能,wasm情况下使用Firefox浏览功能正常(浅浅测试了一下)。
改动css是因为在引入panzoom后原有样式会导致scale中心点偏移。

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