如何解决在Forge Viewer中更改模型的属性面板
解决方法
您应该从奥古斯都读this article。本文介绍了如何添加属性,但是从列表中删除/过滤属性的原理相同。这是您可能需要的一些API:
/**
* Adds the given properties to the display panel.
* @param {Array} properties - An array of properties,each property represented as {displayName: name,displayValue: value}.
* @param {Object=} [options] - An optional dictionary of options. Currently unused.
*/
PropertyPanel.prototype.setProperties = function (properties,options)
/**
* Adds a property to this panel. The property is defined by its name,value,and category. The
* add will fail if a property with the same name,and category already exists.
*
* @param {string} name - The name of the property to add.
* @param {string} value - The value of the property to add.
* @param {string} category - The category of the property to add.
* @param {Object=} [options] - An optional dictionary of options.
* @param {boolean} [options.localizeCategory=false] - When true,localization is attempted for the given category
* @param {boolean} [options.localizeProperty=false] - When true,localization is attempted for the given property
* @returns {boolean} - true if the property was added,false otherwise.
*/
PropertyPanel.prototype.addProperty = function (name,category,options)
/**
* Returns whether this property panel currently has properties.
*
* @returns {boolean} - true if there are properties to display,false otherwise.
*/
PropertyPanel.prototype.hasProperties = function ()
/**
* Removes a property from this panel. The property is defined by its name,and category.
*
* @param {string} name - The name of the property to remove.
* @param {string} value - The value of the property to remove.
* @param {string} category - The category of the property to remove.
* @param {Object=} [options] - An optional dictionary of options. Currently unused.
* @returns {boolean} - true if the property was removed,false otherwise.
*/
PropertyPanel.prototype.removeProperty = function (name,options)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。