getScrollState
Description
返回滚动位置
getScrollState: () => { x: number, y: number }
Returns
ScrollState- (ScrollState) - 该滚动位置对象
Example
const sPos = gantt.getScrollState(); // {x:58,y:180}
const posX = sPos.x;
const posY = sPos.y;
Details
该方法返回一个包含以下属性的对象:
- y - 垂直方向滚动的像素数量
- x - 水平方向滚动的像素数量
- inner_width - 可见时间线区域的宽度
- inner_height - 可见时间线区域的高度
- width - 时间线区域的滚动宽度
- height - 时间线区域的滚动高度
Related API
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.