Commit 88f05d6a by liyuhang19990520

自动布局

parent ea47458d
......@@ -143,54 +143,59 @@ export default {
allowSwitchJunctionPoint: true,
defaultLineShape: 1,
layouts: [
// {
// label: "上口树",
// layoutName: "tree",
// layoutClassName: "seeks-layout-center",
// from: "bottom",
// defaultNodeWidth: "74",
// defaultNodeHeight: "74",
// defaultJunctionPoint: "tb",
// defaultNodeShape: 1,
// defaultLineShape: 1,
// defaultNodeBorderWidth: 0,
// min_per_width: 80,
// min_per_height: 110,
// },
// {
// label: "中心图",
// layoutName: "center",
// layoutClassName: "seeks-layout-center",
// distance_coefficient: "0.8",
// },
// {
// label: "下口树",
// layoutName: "tree",
// layoutClassName: "seeks-layout-center",
// from: "top",
// defaultNodeWidth: "74",
// defaultNodeHeight: "74",
// defaultJunctionPoint: "tb",
// defaultNodeShape: 1,
// defaultLineShape: 1,
// defaultNodeBorderWidth: 0,
// min_per_width: 80,
// min_per_height: 110,
// },
// {
// label: "横向树",
// layoutName: "tree",
// layoutClassName: "seeks-layout-center",
// from: "left",
// defaultJunctionPoint: "lr",
// defaultNodeWidth: "74",
// defaultNodeHeight: "74",
// defaultNodeShape: 1,
// defaultLineShape: 1,
// defaultNodeBorderWidth: 0,
// min_per_width: 400,
// max_per_width: 400,
// min_per_height: 80,
// },
{
label: "上口树",
layoutName: "tree",
layoutClassName: "seeks-layout-center",
from: "bottom",
defaultNodeWidth: "74",
defaultNodeHeight: "74",
defaultJunctionPoint: "tb",
defaultNodeShape: 1,
defaultLineShape: 1,
defaultNodeBorderWidth: 0,
min_per_width: 80,
min_per_height: 110,
},
{
label: "中心图",
layoutName: "center",
layoutClassName: "seeks-layout-center",
distance_coefficient: "0.8",
},
{
label: "下口树",
layoutName: "tree",
layoutClassName: "seeks-layout-center",
from: "top",
defaultNodeWidth: "74",
defaultNodeHeight: "74",
defaultJunctionPoint: "tb",
defaultNodeShape: 1,
defaultLineShape: 1,
defaultNodeBorderWidth: 0,
min_per_width: 80,
min_per_height: 110,
},
{
label: "横向树",
layoutName: "tree",
layoutClassName: "seeks-layout-center",
from: "left",
defaultJunctionPoint: "lr",
defaultNodeWidth: "74",
defaultNodeHeight: "74",
defaultNodeShape: 1,
defaultLineShape: 1,
defaultNodeBorderWidth: 0,
min_per_width: 400,
max_per_width: 400,
min_per_height: 80,
label: "自动布局",
layoutName: "force",
layoutClassName: "seeks-layout-force",
},
],
defaultJunctionPoint: "border",
......@@ -380,7 +385,10 @@ export default {
this.$refs.seeksRelationGraph.setJsonData(
__graph_json_data,
(seeksRGGraph) => {
this.layoutsProps(seeksRGGraph);
setTimeout(() => {
seeksRGGraph.graphSetting.layouter.stop();
}, 1000);
// this.layoutsProps(seeksRGGraph);
if (this.type == "shce" || this.type == "cqthfx") {
setTimeout(() => {
let arr = seeksRGGraph.getNodes();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment