본문으로 건너뛰기

exists()

설명

지정된 항목이 다이어그램에 존재하는지 확인합니다

사용법

exists(id: string | number): boolean;

매개변수

  • id - (필수) 확인할 항목의 id

반환값

이 메서드는 항목이 존재하면 true를, 존재하지 않으면 false를 반환합니다

예제

const diagram = new dhx.Diagram("diagram_container", {
type: "default"
});
diagram.data.parse(data);

const shape = diagram.data.exists("1");