Autodesk Forge对接面板水平滚动

时间:2018-12-14 08:41:04

标签: autodesk-forge autodesk-viewer forge

是否可以将水平滚动添加到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);
};

1 个答案:

答案 0 :(得分:0)

只需将以下样式应用于容器:

container.style.overflowY = "scroll"