Autodesk forge 如何更改停靠面板';书名
我想更改面板的标题(使用dockingpanel创建) 我使用方法dockingpanel“setTitle(…)” 发生了以下错误 " DockingPanel.js:477未捕获类型错误:无法读取未定义的属性“removeAttribute” 在MyPanel.o.setTitle(DockingPanel.js:477) "Autodesk forge 如何更改停靠面板';书名,autodesk-forge,Autodesk Forge,我想更改面板的标题(使用dockingpanel创建) 我使用方法dockingpanel“setTitle(…)” 发生了以下错误 " DockingPanel.js:477未捕获类型错误:无法读取未定义的属性“removeAttribute” 在MyPanel.o.setTitle(DockingPanel.js:477) " 如果您能告诉我如何更改停靠面板标题,我将不胜感激。这几乎就像您在调用其super构造函数之前调用的DockinPanel\setTitle。请在Autodesk.Vi
如果您能告诉我如何更改停靠面板标题,我将不胜感激。这几乎就像您在调用其super构造函数之前调用的
DockinPanel\setTitle
。请在Autodesk.Viewing.UI.DockingPanel.call
或super()
// es5
var SimplePanel = function(parentContainer, id, title, content, x, y)
{
this.content = content;
Autodesk.Viewing.UI.DockingPanel.call(this, parentContainer, id, '');
// Auto-fit to the content and don't allow resize. Position at the coordinates given.
//
this.container.style.height = "auto";
this.container.style.width = "auto";
this.container.style.resize = "none";
this.container.style.left = x + "px";
this.container.style.top = y + "px";
// Call setTitle here
};
SimplePanel.prototype = Object.create(Autodesk.Viewing.UI.DockingPanel.prototype);
SimplePanel.prototype.constructor = SimplePanel;
// es6
class SimplePanel extends Autodesk.Viewing.UI.DockingPanel {
constructor(parentContainer, id, title, content, x, y) {
super();
// Call setTitle here
}
}