fix(item): fix item source and target

This commit is contained in:
Elaine1234 2019-03-21 15:31:34 +08:00
parent 9093792ec8
commit 4616fd1c5f
3 changed files with 4 additions and 4 deletions

View File

@ -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",

View File

@ -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',

View File

@ -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);