mirror of
https://gitee.com/antv/g6.git
synced 2024-12-04 20:59:15 +08:00
fix conflict
This commit is contained in:
commit
abb5f414da
@ -48,6 +48,11 @@
|
||||
shape: 'custom'
|
||||
});
|
||||
graph.read(data);
|
||||
setTimeout(()=>{
|
||||
graph.update('node1', {
|
||||
title: 'sss'
|
||||
});
|
||||
}, 1000);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -100,7 +100,7 @@
|
||||
"screenshot": "node ./bin/screenshot.js",
|
||||
"start": "npm run dev",
|
||||
"test": "torch --compile --renderer --recursive ./test/unit",
|
||||
"test-live": "torch --compile --interactive --watch --recursive ./test/unit/util/",
|
||||
"test-live": "torch --compile --interactive --watch --recursive ./test/unit/",
|
||||
"watch": "webpack --config webpack-dev.config.js",
|
||||
"win-dev": "node ./bin/win-dev.js"
|
||||
},
|
||||
|
@ -172,7 +172,12 @@ class Plugin {
|
||||
if (!model.isTreeEdge || typeof model.isTreeEdge === 'undefined') model.shape = 'quadraticCurve';
|
||||
}
|
||||
graph.edge({
|
||||
style: this.edgeStyle,
|
||||
style: model => {
|
||||
if (model.actived) {
|
||||
return this.activedEdgeStyle;
|
||||
}
|
||||
return this.edgeStyle;
|
||||
},
|
||||
endArrow: true
|
||||
});
|
||||
graph.node({
|
||||
@ -188,7 +193,7 @@ class Plugin {
|
||||
graph.draw();
|
||||
} else if (item.isEdge) {
|
||||
graph.simpleUpdate(item, {
|
||||
style: this.activedEdgeStyle
|
||||
actived: true
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -200,7 +205,7 @@ class Plugin {
|
||||
graph.draw();
|
||||
} else if (item.isEdge) {
|
||||
graph.simpleUpdate(item, {
|
||||
style: this.edgeStyle
|
||||
actived: false
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -37,12 +37,10 @@ class Controller extends Base {
|
||||
mapping(model) {
|
||||
const channels = this.channels;
|
||||
Util.each(channels, (channel, name) => {
|
||||
if (Util.isNil(model[name])) {
|
||||
if (Util.isFunction(channel.input)) {
|
||||
model[name] = channel.input(model);
|
||||
} else if (channel.input) {
|
||||
model[name] = channel.input;
|
||||
}
|
||||
if (Util.isFunction(channel.input)) {
|
||||
model[name] = channel.input(model);
|
||||
} else if (channel.input) {
|
||||
model[name] = channel.input;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -70,7 +70,6 @@ class Item {
|
||||
}
|
||||
_init() {
|
||||
this._setIndex();
|
||||
this._mapping();
|
||||
this._setShapeObj();
|
||||
this._initGroup();
|
||||
this.draw();
|
||||
@ -188,6 +187,7 @@ class Item {
|
||||
const group = this.group;
|
||||
group.clear(!animate);
|
||||
const shapeObj = this.shapeObj;
|
||||
this._mapping();
|
||||
const keyShape = shapeObj.draw(this);
|
||||
if (keyShape) {
|
||||
keyShape.isKeyShape = true;
|
||||
|
Loading…
Reference in New Issue
Block a user