shapeMoveEnd
Description
Fires after a shape is moved
Usage
shapeMoveEnd: (
event: MouseEvent,
id: string | number,
coord: object
) => void;
Parameters
The callback of the event takes the following parameters:
event
- (required) a native HTML event objectid
- (required) the id of a shapecoord
- (required) an object with the x and y coordinates of the shape position after movement
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("shapeMoveEnd", (event, id, coordinates) => {
console.log(`
Shape ${id} is position:
x: ${coordinates.x}
y: ${coordinates.y}
`);
});
Change log: Added in v4.0