본문으로 건너뛰기

afterShapeIconClick

설명

항목별 툴바의 컨트롤을 클릭한 후 발생합니다.

사용법

"afterShapeIconClick": (
iconId: string,
shape: object
) => void;

매개변수

이벤트의 콜백은 다음 매개변수와 함께 호출됩니다:

  • iconId - 툴바 컨트롤의 유형 또는 id
  • shape - 항목 구성이 포함된 객체
정보

내부 Diagram Editor 이벤트를 처리하려면 on() 메서드를 사용할 수 있습니다.

예제

// Diagram Editor 초기화
const editor = new dhx.DiagramEditor("editor_container");
// 데이터 로드
editor.parse(data);

// 이벤트에 핸들러 연결
editor.events.on("afterShapeIconClick", (iconId, shape) => {
console.log(`
You've clicked the ${iconId} toolbar control of the shape ${shape.id}
`);
});

변경 로그: v3.1에서 추가되었습니다