File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 17
17
align-items: center;
18
18
}
19
19
</v-style >
20
- <d3-network :net-nodes =" nodes" :net-links =" links" :options =" options" :link-cb =" link_cb" />
20
+ <d3-network :net-nodes =" nodes" :net-links =" links" :options =" options" :link-cb =" link_cb" ref = " net " />
21
21
<svg width =" 0" height =" 0" >
22
22
<defs >
23
23
<marker id =" m-end" markerWidth =" 10" markerHeight =" 10" refX =" 9" refY =" 3" orient =" auto" markerUnits =" strokeWidth" >
@@ -63,7 +63,8 @@ export default {
63
63
nodeLabels: true ,
64
64
nodeSize: config .node_size || 16 ,
65
65
size: {
66
- h: config .height || 400
66
+ h: config .height || 400 ,
67
+ w: config .width || undefined
67
68
}
68
69
}
69
70
}
@@ -155,6 +156,13 @@ export default {
155
156
}
156
157
})
157
158
}
159
+ },
160
+ mounted () {
161
+ setTimeout (() => {
162
+ if (! this .options .size .w ) {
163
+ this .$refs .net .onResize ()
164
+ }
165
+ }, 100 )
158
166
}
159
167
}
160
168
</script >
You can’t perform that action at this time.
0 commit comments