简体   繁体   English

MarkupsCore Extension 自定义代码后无法与 Autodesk View 交互

[英]Unable to interact with Autodesk View after MarkupsCore Extension custom code

I am using Autodesk.Viewing.MarkupsCore Extension for marking up rectangle in 3d viewer while orientation of the view is TOP.我正在使用 Autodesk.Viewing.MarkupsCore Extension 在 3d 查看器中标记矩形,而视图的方向是 TOP。

Then I am saving the coordinates and deleting all the markups.然后我保存坐标并删除所有标记。

But after I leave EditMode and remove all the markup I neither can move the view nor can rotate it.但是在我离开EditMode并删除所有标记后,我既不能移动视图也不能旋转它。

I have tried this:我试过这个:

 if (this.state.markupOn) { // this is the condition of leaving the markup
       markupExtension.leaveEditMode();

      svgData = markupExtension.generateData();
       markupExtension.unloadMarkupsAllLayers();
      markupExtension.viewer.impl.invalidate(true);
      markupExtension.leaveEditMode();
      window.Autodesk.Viewing.Extensions.Markups.Core.Utils.showLmvToolsAndPanels(
        this.viewer
      );
      this.setState({ markupOn: !this.state.markupOn });
      return;
    }

After trying all this I am unable to interact with view.在尝试了所有这些之后,我无法与视图进行交互。 Please help me with this.请帮我解决一下这个。

The usage of the markups extension is explained in this blog post: https://forge.autodesk.com/blog/using-autodeskviewingmarkupscore-extension .这篇博文中解释了标记扩展的用法: https : //forge.autodesk.com/blog/using-autodeskviewingmarkupscore-extension

If you followed this article and you're still having issues, please send us a more complete code sample to forge (dot) help (at) autodesk (dot) com so that we can explore it further.如果您按照本文进行操作但仍有问题,请向我们发送更完整的代码示例以forge (dot) help (at) autodesk (dot) com以便我们进一步探索。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM