mirror of
https://gitee.com/antv/g6.git
synced 2024-12-05 05:09:07 +08:00
fix: sort out graph events
This commit is contained in:
parent
ee4685ece9
commit
785cb03677
@ -29,6 +29,7 @@ class ItemController {
|
||||
}
|
||||
});
|
||||
}
|
||||
graph.emit('beforeadditem', { type, model });
|
||||
if (type === EDGE) {
|
||||
let source = model.source;
|
||||
let target = model.target;
|
||||
@ -60,7 +61,7 @@ class ItemController {
|
||||
graph.get(type + 's').push(item);
|
||||
graph.get('itemMap')[item.get('id')] = item;
|
||||
graph.autoPaint();
|
||||
graph.emit('aftereadditem', { type, model });
|
||||
graph.emit('afteradditem', { type, model });
|
||||
return item;
|
||||
}
|
||||
updateItem(item, cfg) {
|
||||
|
Loading…
Reference in New Issue
Block a user