Repository navigation
[skip eval] feat: 大图查看支持缩放与平移 - #386
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
点开大图后只能看到适应屏幕的尺寸,没法放大看细节,比如生成图上相机模组的零件。
改动
新增
ZoomableImage,替换ImageViewer里的<img>。消息图片、生成图片、输入框预览、会话文件面板都用同一个查看器,所以这几处都能缩放。验证
ImageViewer.test.tsx新增 3 个测试:双击放大和还原、滚轮缩放到最小时复位、放大后拖动平移。新增ZoomableImage.test.ts,测试锚点不动的缩放计算和倍数上下限。🤖 Generated with Claude Code