mirror of
https://gitee.com/antv/g6.git
synced 2024-11-29 18:28:19 +08:00
fix(item): fix item source and target
This commit is contained in:
parent
9093792ec8
commit
4616fd1c5f
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antv/g6",
|
||||
"version": "3.0.0-rc.2",
|
||||
"version": "3.0.0-rc.3",
|
||||
"description": "graph visualization frame work",
|
||||
"main": "build/g6.js",
|
||||
"homepage": "https://github.com/antvis/g6",
|
||||
|
@ -3,7 +3,7 @@
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
version: '3.0.0-rc.2',
|
||||
version: '3.0.0-rc.3',
|
||||
rootContainerClassName: 'root-container',
|
||||
nodeContainerClassName: 'node-container',
|
||||
edgeContainerClassName: 'edge-container',
|
||||
|
@ -78,15 +78,15 @@ class ItemController {
|
||||
let source = cfg.source;
|
||||
if (Util.isString(source)) {
|
||||
source = graph.findById(source);
|
||||
item.setSource(source);
|
||||
}
|
||||
item.setSource(source);
|
||||
}
|
||||
if (cfg.target) {
|
||||
let target = cfg.target;
|
||||
if (Util.isString(target)) {
|
||||
target = graph.findById(target);
|
||||
item.setTarget(target);
|
||||
}
|
||||
item.setTarget(target);
|
||||
}
|
||||
}
|
||||
item.update(cfg);
|
||||
|
Loading…
Reference in New Issue
Block a user