跳到主要内容

onGridResize

信息

此功能仅在 PRO 版本中提供。

Description

在用户拖动网格边框以调整网格大小时触发

onGridResize: (old_width: number, new_width: number) => void;

Parameters

  • old_width - (必填) number - 初始网格宽度
  • new_width - (必填) number - 新的网格宽度

Example

gantt.attachEvent("onGridResize", function(old_width, new_width){
if(!message){
message = gantt.message({expire:-1,
text:"网格现在的宽度为 <b id='width_placeholder'></b><b>px</b>"});
}
document.getElementById("width_placeholder").innerText = new_width;
});
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.