afterLineTitleMove
Description
Fires when a text element of a line is moved one grid step
Usage
afterLineTitleMove: (
event: MouseEvent,
lineId: string | number,
titleId: string | number,
coord: object
) => void;
Parameters
The callback of the event takes the following parameters:
event
- (required) a native HTML event objectlineId
- (required) the id of a linetitleId
- (required) the id of a text element of a linecoord
- (required) an object with the x and y coordinates of the text element 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("afterLineTitleMove", (event, lineId, titleId, coordinates) => {
console.log(`
LineTitle ${id} is position:
x: ${coordinates.x}
y: ${coordinates.y}
`);
});
Change log: Added in v4.1