shapeMouseDown

fires when a pointing device button is pressed while the pointer is over a shape

void shapeMouseDown(string|number id){ ... };

Parameters

idstring|numberthe id of a shape

Example

diagram.events.on("shapeMouseDown", function(id) {
    console.log('An item "' + diagram.data.getItem(id).text + '"will be clicked');
});
 
// For editor
editor.diagram.events.on("shapeMouseDown", function(id) {
  console.log('An item "' + editor.diagram.data.getItem(id).text + '"will be clicked');
});

Related samples

See also
Back to top