Skip to content

Commit 822eafe

Browse files
committed
nodes bug fix
1 parent 35c2750 commit 822eafe

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

components/nodes/GraphNode.vue

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export default{
7979
const data = this.node.data;
8080
this.nodes = data.GRAPH.nodes;
8181
this.links = data.GRAPH.links;
82-
82+
8383
this.simulation = d3.forceSimulation(this.nodes)
8484
.force('x', d3.forceX().x(d=>d.xpos).strength(d=>d.xstr))
8585
.force('y', d3.forceY().y(d=>d.ypos).strength(d=>d.ystr))
@@ -141,12 +141,6 @@ export default{
141141
}
142142
},
143143
updated(){
144-
// if(this.node.data.GRAPH){
145-
// if(!this.nodes) this.updateGraph();
146-
// }else{
147-
// this.nodes = null;
148-
// this.links = null;
149-
// }
150144
if(this.node.data.GRAPH) this.updateGraph();
151145
},
152146
mounted(){

language/components.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ class GraphComponent extends Rete.Component {
945945
radialCenter: inputs.radial.length ? inputs.radial[0].center : [],
946946
iterations: inputs.links.length ? inputs.links[0].iterations : null,
947947
...(inputs.links.length ? {links: inputs.links[0].links} : {}),
948-
nodes: inputs.id.map((d, i)=>{
948+
nodes: inputs.id[0].map((d, i)=>{
949949
return {
950950
id: d,
951951
radius: inputs.radius.length ? inputs.radius[0][i] : node.data.radius || null,

0 commit comments

Comments
 (0)