跳到主要内容

scrollTo

Description

将 Gantt 容器滚动到指定位置

scrollTo: (x?: number | null, y?: number | null) => void

Parameters

  • x - (optional) number | null - 可选,水平滚动的值,或 'null'(如果不应改变滚动位置)
  • y (optional) number | null - 可选,垂直滚动的值,或 'null'(如果不应改变滚动位置)

Example

gantt.scrollTo(30, 80); // 同时水平和垂直滚动容器

gantt.scrollTo(30, null); // 仅水平滚动容器

gantt.scrollTo(null, 80); // 仅垂直滚动容器
Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.