Skip to main content

lineTitleMoveEnd

Description

Fires after a text element of a line is moved

Usage

lineTitleMoveEnd: (
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 object
  • lineId - (required) the id of a line
  • titleId - (required) the id of a text element of a line
  • coord - (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("lineTitleMoveEnd", (event, lineId, titleId, coordinates) => {
console.log(`
LineTitle ${id} is position:
x: ${coordinates.x}
y: ${coordinates.y}
`);
});

Change log: Added in v4.1