【问题标题】:Vis.js Timeline with verticalScroll at the right side右侧带有verticalScroll的Vis.js时间轴
【发布时间】:2019-08-28 21:46:30
【问题描述】:

我正在使用带有选项verticalScroll: true 的 Vis.js 时间轴库。我正在关注这个例子:https://visjs.github.io/vis-timeline/examples/timeline/other/verticalScroll.html

  ...
  var options = {
    stack: true,
    verticalScroll: true,
    zoomKey: 'ctrlKey',
    maxHeight: 200,
    start: new Date(),
    end: new Date(1000*60*60*24 + (new Date()).valueOf()),
  };

  // create a Timeline
  var container1 = document.getElementById('mytimeline1');
  timeline1 = new vis.Timeline(container1, items, groups, options);

我需要将滚动条放在右侧。有可能吗?
是否有任何配置选项可以做到这一点?

【问题讨论】:

    标签: javascript timeline vis.js


    【解决方案1】:

    去掉选项中的maxHeight属性,你会看到右侧的滚动条。

    【讨论】:

    • 但我需要maxHeight。去掉maxHeight父元素或者整个页面都会有滚动条,而不仅仅是时间轴。
    猜你喜欢
    • 2019-03-06
    • 1970-01-01
    • 1970-01-01
    • 2022-11-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-01-09
    相关资源
    最近更新 更多