본문으로 건너뛰기

itemRotateEnd

설명

항목의 회전 작업이 완료된 후(사용자가 마우스 버튼을 놓을 때) 발생합니다

사용법

"itemRotateEnd": ({
id: string | number,
angle: number
}) => void;

매개변수

이 이벤트의 콜백은 다음 매개변수를 포함하는 객체와 함께 호출됩니다:

  • id - 회전된 항목의 id
  • angle - 항목의 최종 회전 각도(도 단위)

예제

// initializing Diagram Editor
const editor = new dhx.DiagramEditor("editor_container");
// loading data
editor.parse(data);

// attaching a handler to the event
editor.events.on("itemRotateEnd", ({ id, angle }) => {
console.log(`The item ${id} finished rotating, the final angle: ${angle}`);
// Here you can save the new rotation angle of the item on the server
});

변경 로그:

  • 이 이벤트는 v6.1에서 추가되었습니다

관련 API:

관련 샘플: