본문으로 건너뛰기

beforeCellsAdd

설명

새로운 셀이 swimlane에 추가되기 전에 발생합니다

사용법

beforeCellsAdd: (swimlaneId: string | number) => boolean | void;

매개변수

이 이벤트의 콜백은 다음 매개변수를 받습니다:

  • swimlaneId - (필수) 항목의 ID

반환값

새로운 셀 추가를 방지하려면 false를 반환하고, 그렇지 않으면 true를 반환합니다

예제

// Diagram 초기화
const diagram = new dhx.Diagram("diagram_container", {
type: "default"
});
// 데이터 로드
diagram.data.parse(data);

// 이벤트에 핸들러 연결
diagram.events.on("beforeCellsAdd", (swimlaneId) => {
console.log(swimlaneId);
return true;
});

변경 로그: v4.0에서 추가

관련 문서: Swimlane 구성