Fullscreen 扩展

关于 Fullscreen 扩展的更多信息,请参阅 全屏模式 文章。
fullscreen 对象包含以下 API:

方法

  • expand (): void - 将 gantt 切换为全屏模式
gantt.ext.fullscreen.expand();
  • collapse (): void - 退出全屏模式,并将 gantt 恢复为正常大小
gantt.ext.fullscreen.collapse();
  • toggle (): void - 如果 gantt 当前处于全屏,则触发 collapse() 方法;如果不是,则触发 expand() 方法
gantt.ext.fullscreen.toggle();
  • getFullscreenElement (): HTMLElement - 返回在调用 expand() 方法时将显示为全屏的 DOM 元素
gantt.ext.fullscreen.getFullscreenElement();

默认情况下,getFullscreenElement() 方法返回包含 Gantt 图表的 HTML 容器。

Back to top