缺少 Edit2D 事件的字符串是什么?
What are the strings for missing Edit2D events?
您将在下方找到 v7 查看器的 utodesk 文档摘录 here。
我试图引用两个事件侦听器。但是,这些没有现有的事件字符串。 Autodesk.Edit2D.SELECTION_CHANGED 和 Autodesk.Edit2D.SELECTION_HOVER_CHANGED 在加载扩展后将无法在我的控制台中运行(它们只是return 未定义。有没有办法找到此扩展程序的事件字符串列表?
Synchronizing selection
You can also synchronize selection with Edit2D for certain items in your UI using >edit2d.context.selection.
One way to do this is to register a handler. The handler ensures the application is notified if >selection changes.
In the following example, we’ve set the handler to listen for mouse clicks.
// Register your handler
ctx.selection.addEventListener(Autodesk.Edit2D.SELECTION_CHANGED, onSelectionChanged);
Similarly, you can set the handler to synchronize mouse hovering:
// Update UI state on hover changes
ctx.selection.addEventListener(Autodesk.Edit2D.SELECTION_HOVER_CHANGED, onHoverChanged);
您可以在 'Autodesk.Edit2D.Selection.Events' 下找到两个事件的事件字符串,如下面的代码。
// Register your handler
ctx.selection.addEventListener(Autodesk.Edit2D.Selection.Events.SELECTION_CHANGED, onSelectionChanged);
// Update UI state on hover changes
ctx.selection.addEventListener(Autodesk.Edit2D.Selection.Events.SELECTION_HOVER_CHANGED, onHoverChanged);
您将在下方找到 v7 查看器的 utodesk 文档摘录 here。 我试图引用两个事件侦听器。但是,这些没有现有的事件字符串。 Autodesk.Edit2D.SELECTION_CHANGED 和 Autodesk.Edit2D.SELECTION_HOVER_CHANGED 在加载扩展后将无法在我的控制台中运行(它们只是return 未定义。有没有办法找到此扩展程序的事件字符串列表?
Synchronizing selection
You can also synchronize selection with Edit2D for certain items in your UI using >edit2d.context.selection. One way to do this is to register a handler. The handler ensures the application is notified if >selection changes. In the following example, we’ve set the handler to listen for mouse clicks.
// Register your handler ctx.selection.addEventListener(Autodesk.Edit2D.SELECTION_CHANGED, onSelectionChanged);
Similarly, you can set the handler to synchronize mouse hovering:
// Update UI state on hover changes ctx.selection.addEventListener(Autodesk.Edit2D.SELECTION_HOVER_CHANGED, onHoverChanged);
您可以在 'Autodesk.Edit2D.Selection.Events' 下找到两个事件的事件字符串,如下面的代码。
// Register your handler
ctx.selection.addEventListener(Autodesk.Edit2D.Selection.Events.SELECTION_CHANGED, onSelectionChanged);
// Update UI state on hover changes
ctx.selection.addEventListener(Autodesk.Edit2D.Selection.Events.SELECTION_HOVER_CHANGED, onHoverChanged);