본문으로 건너뛰기

Toolbar 이벤트 개요

다음 SuiteToolbar 이벤트를 사용할 수 있습니다:

이름설명
afterHideToolbar의 하위 항목을 숨긴 후 발생합니다
beforeHideToolbar의 하위 항목을 숨기기 전에 발생합니다
click컨트롤을 클릭한 후 발생합니다
input입력 필드에 텍스트를 입력할 때 발생합니다
inputBlur컨트롤이 포커스를 잃을 때 발생합니다
inputChangeToolbar의 Input 컨트롤에서 값이 변경될 때 발생합니다
inputFocus컨트롤이 포커스를 얻을 때 발생합니다
keydownToolbar의 컨트롤이 포커스된 상태에서 아무 키나 누르면 발생합니다
openMenu메뉴 컨트롤을 확장할 때 발생합니다
const editor = new dhx.DiagramEditor("editor_container", {
type: "default",
view: {
toolbar: true
}
});
// "click" 이벤트를 처리합니다
editor.toolbar.events.on("click", (id, event) => {
// 로직 작성
});

TreeCollection 이벤트 개요

다음 SuiteTreeCollection 이벤트를 사용할 수 있습니다:

이름설명
afterAddtree collection에 새 항목을 추가한 후 발생합니다
afterRemovetree collection에서 항목을 제거한 후 발생합니다
beforeAddtree collection에 새 항목을 추가하기 전에 발생합니다
beforeRemovetree collection에서 항목을 제거하기 전에 발생합니다
changetree collection이 수정될 때 발생합니다
filtertree collection을 필터링한 후 발생합니다
loadtree collection에 항목이 로드될 때 발생합니다
loadError데이터 로드가 실패할 때 발생합니다
removeAlltree collection에서 모든 항목이 제거될 때 발생합니다
const editor = new dhx.DiagramEditor("editor_container", {
type: "default",
view: {
toolbar: true
}
});
// "load" 이벤트를 처리합니다
editor.toolbar.events.on("load", () => {
// 여기에 로직 작성
});
// 새 toolbar 데이터 로드
editor.toolbar.parse(["file", "spacer", "scale"]);