我可以禁用最新查看器版本的本机矩形选择吗?

发布于 2025-01-14 19:26:45 字数 438 浏览 2 评论 0原文

最新版本的 Autodesk Forge Viewer 通过使用 ctrl 键实现了矩形选择工具。我们已经实现了一个多重选择工具(使用博客文章 https://forge.autodesk.com/blog/custom-window-selection-forge-viewer-simpler-extension),它使用 ctrl 键添加到当前选择。问题是,当按下 ctrl 键时,本机工具会激活,并且由于本机行为是在选择之前取消选择所有内容,因此我们无法使我们的工具按预期工作。

是否可以禁用本机工具的 ctrl 键激活?在查看器源中搜索按键非常困难,而且我找不到任何指向此工具的内容。

Recent versions of the Autodesk Forge Viewer implemented a rectangle selection tool, by using the ctrl key. We've already implemented a multi-selection tool (using the blog post https://forge.autodesk.com/blog/custom-window-selection-forge-viewer-simpler-extension), and it uses the ctrl key to add to the current selection. The issue is that, when the ctrl key is pressed, the native tool activates, and since the native behavior is to deselect all before selecting, we can't make our tool to work as intended.

Is it possible to disable the ctrl key activation of the native tool? Searching the Viewer source for key presses is very hard, and I couldn't find anything pointing to this tool.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

终遇你 2025-01-21 19:26:45

您可以传递如下所示的 disabledExtensions 选项,以防止 Forge Viewer 自动加载 Autodesk.BoxSelection 扩展。

const config3d = {
  disabledExtensions: { boxSelection: true }
};

const viewer = new Autodesk.Viewing.Private.GuiViewer3D( viewerDiv, config3d );

You may pass an option disabledExtensions like the below to prevent Forge Viewer from loading the Autodesk.BoxSelection extension automatically.

const config3d = {
  disabledExtensions: { boxSelection: true }
};

const viewer = new Autodesk.Viewing.Private.GuiViewer3D( viewerDiv, config3d );
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文