指定组中的 elementFromPoint

发布于 2024-11-28 21:20:16 字数 324 浏览 5 评论 0原文

在 SVG 文档中,

我可以仅在指定组中使用 elementFromPoint() 吗?

我试图找到占用特定坐标的所有元素。

用于查找直线或圆的交点。

为了执行此操作以及撤消或重做功能,我的 SVG 将每个元素附加到 ID 为 线性增加。

例如在lastest made group和

lastest-1 made group上逐点查找元素。

我还尝试再次将显示属性设置为 none 和 elemetFromPoint,但没有运气。

关于仅从指定组中的点查找元素有什么想法吗?

提前致谢!

in SVG document

can I use elementFromPoint() in only specified group?

I am trying to find all Elements which take up specific coordinate.

for finding line or circle intersections.

to do this and undo or redo function, my SVG append every element to group whose ID is
linearly increase.

such as finding element by point on lastest made group and

lastest-1 made group.

I also tried set display attribute to none and elemetFromPoint again, but have no luck.

any idea about finding element from point in only specified group?

thanks in advanced!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文