是否可以将水平滚动添加到viewerAPI提供的滚动容器中?
最好
OwnDockingPanel.prototype = Object.create(Autodesk.Viewing.UI.DockingPanel.prototype);
OwnPanel.prototype.constructor = OwnDockingPanel;
OwnDockingPanel.prototype.initialize = function () {
this.title = this.createTitleBar(this.titleLabel || this.container.id);
// id für titel of panel erstellen
this.title.id = this.container.id + "_" + this.titleLabel;
this.container.appendChild(this.title);
this.container.appendChild(this.content);
this.initializeMoveHandlers(this.container);
this.closer = this.createCloseButton();
this.title.appendChild(this.closer);
var op = { left: true, heightAdjustment: 45, marginTop: 0 };
this.scrollcontainer = this.createScrollContainer(op);
$(this.scrollContainer).append(htmlContent);
this.footer = this.createFooter();
this.initializeMoveHandlers(this.title);
this.initializeCloseHandler(this.closer);
};
答案 0 :(得分:0)
只需将以下样式应用于容器:
container.style.overflowY = "scroll"