繁体   English   中英

使用MarkupsCore将SVG重新加载到查看器后,是否可以使SVG可编辑?

[英]Is there any way to make SVGs editable after loading them back onto the viewer with MarkupsCore?

因此,我目前遇到的问题是,用户进行标记后,将其存储到数据库中,当我重新加载它时,就无法再对其进行编辑。 我意识到api是按这种方式设计的,但是我想知道是否有一种方法可以将标记添加回去,并且仍然能够更改文本,移动它们等。

我真的没有主意,因此将不胜感激。

您可以按如下方式编辑保存的标记。 此功能已在2.16版中添加到API中:

// string with markups data generated with markupsExt.generateData()
var modelMarkups = '...';

// Load the markups extension
viewer.loadExtension('Autodesk.Viewing.MarkupsCore').then(function(markupsExt){

    markupsExt.show();

    // Load markups onto "layerA"
    markupsExt.loadMarkups(modelMarkups, "layerA"); 

     // Allow editing of markups in "layerA"
    markupsExt.enterEditMode("layerA");            
})

暂无
暂无

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

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