Autodesk Forge Viewer标记样式对象 [英] Autodesk Forge Viewer Markup Style Object
问题描述
我引用了
推荐答案
对于延误,请接受我们的诚挚歉意,我们的待办事项积压.
Please accept our sincere apologies for the delay, we have a backlog in the queue.
我发现最近查看器附带的 MarkupCore
中有一些更改.您正在寻找的这份文档 http://autodeskviewer.com/viewers/latest/docs/tutorial-feature_markup.html
太旧了,无法反映这些更改.请使用以下代码段:
I found there something changed in the MarkupCore
shipped with the recent viewer. This documentation http://autodeskviewer.com/viewers/latest/docs/tutorial-feature_markup.html
you're looking is too old to reflect those changes. Plase use following code snippet:
// Confiurate styles
var styleAttributes = ['stroke-width', 'stroke-color', 'stroke-opacity'];
var nsu = Autodesk.Viewing.Extensions.Markups.Core.Utils;
var styleObject = nsu.createStyle(styleAttributes, markupExt);
styleObject['stroke-width'] = 10;
// Set style up
markupExt.setStyle(styleObject);
createStyle
的第二个参数是 MarkupCore
扩展的加载实例,现在不再是查看器.希望对您有所帮助.
The 2nd parameter of the createStyle
is the loaded instance of the MarkupCore
extension, it's not viewer anymore. Hope it helps.
这篇关于Autodesk Forge Viewer标记样式对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!