I am using CELLS_ADDED event to check if shape added in the graph.
How can I get the label for the shape?
My code is
Graph.prototype.addListener(mxEvent.CELLS_ADDED, function(sender, evt)
{
var e = evt.getProperty('event'); // mouse event
var cell = evt.getProperty('cell'); // cell may be null
var tex = evt.getProperty('text');
if (cell != null)
{
// Do something useful with cell and consume the event
evt.consume();
}
});
I'm not sure what you asking for but maybe what you want is this: