onExternalDragIn
Description
当数据从外部 DHTMLX 组件拖入 scheduler 时触发(需要启用 dnd 扩展)
onExternalDragIn: (id: string, source: object, e: Event) => boolean;
Parameters
id- (required) string - 数据项的 IDsource- (required) object - 被拖入 scheduler 的源 HTML 元素e- (required) Event - 原生事件对象
Returns
result- (boolean) - 指示事件的默认操作是否继续执行(true)或被取消(false)
Example
scheduler.attachEvent("onExternalDragIn", function (id, source, e){
scheduler.getEvent(id).text = source.innerHTML;
return true;
});
Related samples
- 10_integration/02_dhtmlxTree_outer_drag.html
Details
注释
此事件需要启用 outerdrag 插件。
- 此事件允许自定义由拖入操作创建的新事件。
- 通过返回 false 可以阻止该事件,防止在拖动过程中创建新事件。
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.