Skip to content

fix(image, image-annotator-react): 修复浏览器缩放/全屏切换后标注框位置偏移#693

Merged
gary-Shen merged 1 commit intoreleasefrom
fix/annotation-offset-on-browser-zoom
Apr 17, 2026
Merged

fix(image, image-annotator-react): 修复浏览器缩放/全屏切换后标注框位置偏移#693
gary-Shen merged 1 commit intoreleasefrom
fix/annotation-offset-on-browser-zoom

Conversation

@gary-Shen
Copy link
Copy Markdown
Member

  • Renderer.resize() 中重新获取 devicePixelRatio,避免使用构造时的缓存值
  • useImageAnnotator 新增 matchMedia 监听 devicePixelRatio 变化,在浏览器缩放或全屏切换时自动触发 resize 重新校准坐标

- Renderer.resize() 中重新获取 devicePixelRatio,避免使用构造时的缓存值
- useImageAnnotator 新增 matchMedia 监听 devicePixelRatio 变化,在浏览器缩放或全屏切换时自动触发 resize 重新校准坐标

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gary-Shen gary-Shen merged commit 107f353 into release Apr 17, 2026
1 check failed
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.

1 participant