본문으로 건너뛰기

onBeforeTaskDrag

Description

사용자가 마우스 버튼을 누르고 드래깅을 시작했지만, dhtmlxGantt가 드래그 앤 드롭 작동을 시작하기 전 시점에 발생합니다

onBeforeTaskDrag: (id: string | number, mode: string, e: Event) => boolean;

Parameters

  • id - (required) string | number - 태스크 ID
  • mode - (required) string - 드래그 앤 드롭 모드 ("resize", "progress", "move", "ignore")
  • e - (required) Event - 네이티브 이벤트 객체

Returns

  • result - (boolean) - 기본 이벤트 동작이 트리거될지 여부를 정의합니다 (true) 또는 취소될지 여부를 정의합니다 (false)

Example

gantt.attachEvent("onBeforeTaskDrag", function(id, mode, e){
// 여기에 코드 작성
return true;
});

Details

이벤트는 사용자가 타임라인 영역에서 작업을 드래그할 때 발생합니다.

이벤트는 차단 가능합니다. false를 반환하면 작업이 초기 위치로 되돌아갑니다.

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.