shapeHover

fires on moving the mouse pointer over a shape in the editor

void shapeHover(string|number id,Event e){ ... };

Deprecated

instead of it, you can use the itemMouseOver event:

diagram.events.on("itemMouseOver", (id, event) => {
    console.log(id, event);
});
// For diagram editor
editor.diagram.events.on("itemMouseOver", (id, event) => {
    console.log(id, event);
});

Parameters

idstring|numberthe id of a shape
eEventa native event object

Example

diagram.events.on("shapeHover",function(id,e){
    console.log("An item"+ diagram.data.getItem(id).text +"has been hovered over");
});

Change log

Deprecated in v4.0

Back to top