onGridResizeEnd
信息
此功能仅在PRO版本中可用。
Description
在用户完成拖动网格边框以调整网格大小后触发
onGridResizeEnd: (old_width: number, new_width: number) => boolean;
Parameters
old_width- (required) number - 初始网格宽度new_width- (required) number - 新的网格宽度
Returns
result- (boolean) - 定义事件的默认操作是否会被触发(true)还是被取消(false)
Example
// 返回 false 以取消调整大小操作
gantt.attachEvent("onGridResizeEnd", function(old_width, new_width){
gantt.message.hide(message);
message = null;
gantt.message(`Grid is now <b>${new_width}</b>px width`);
return true;
});
Related samples
Details
该事件是可阻塞的。返回 false 将取消网格调整大小。
Related API
Related Guides
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.