Skip to main content

afterItemRotate

Description

Fires after an item has been rotated

Usage

"afterItemRotate": ({
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 item
  • angle - the new 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("afterItemRotate", ({ id, angle }) => {
console.log(`The item ${id} has been rotated by the angle: ${angle}`);
});

Change log:

  • The event is added in v6.1

Related API:

Related samples: