feat(vom): enable screenshot-bound point interaction for visual surfaces - #143
Draft
Ljy-0827 wants to merge 2 commits into
Draft
feat(vom): enable screenshot-bound point interaction for visual surfaces#143Ljy-0827 wants to merge 2 commits into
Ljy-0827 wants to merge 2 commits into
Conversation
Ljy-0827
force-pushed
the
feat/vom-surface-point-interaction
branch
from
August 26, 2026 07:28
573dad1 to
976bce1
Compare
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.
问题描述
VOM 可以识别 Canvas 等视觉渲染区域,但当页面没有提供可靠的可访问性语义时,无法进一步读取其中的单元格、图表节点或其他交互对象。
宿主虽然可以通过截图理解这些内容,但此前缺少一条安全、通用的方式,将截图中的局部坐标转换为实际页面交互坐标。直接使用截图坐标还会受到 iframe 嵌套、裁剪、缩放和页面位置变化的影响。
此外,一些 Canvas 应用会在鼠标移动后的下一次渲染周期才更新命中状态。如果移动和按下事件连续发送,第一次点击可能只更新悬停位置,而没有真正命中目标。
解决方案
参考 codex 的实现方法,本 PR 为 VOM 中的视觉 Surface 增加基于截图的点交互能力:
遗留局限