itemRotateEnd
Description
Fires after the rotation operation of an item is completed (when the user releases the mouse button)
Usage
"itemRotateEnd": ({
id: string | number,
angle: number
}) => void;
Parameters
The callback of the event is called with an object with the following parameters:
id- the id of the rotated itemangle- the final rotation angle of the item in degrees
Example
// 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
});
Change log:
- The event is added in v6.1
Related API:
Related samples: