我正在使用CELLS_ADDED事件检查图形中是否添加了形状。
如何获得形状标签?
我的代码是
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();
}
});
答案 0 :(得分:0)
我不确定您要什么,但也许您想要的是这个
var label = cell.getValue();