Commit faa02166 authored by zhengjiangtao's avatar zhengjiangtao

fix bug

parent de807846
...@@ -274,7 +274,7 @@ class TopologyComponent extends Component { ...@@ -274,7 +274,7 @@ class TopologyComponent extends Component {
), ),
goObj(go.Panel, 'Spot', goObj(go.Panel, 'Spot',
goObj(go.Shape, 'Rectangle', goObj(go.Shape, 'Rectangle',
{ fill: 'lightgreen', stroke: 'red', width: 1, height: 1 }), { fill: 'lightgreen', stroke: null, width: 1, height: 1 }),
goObj(go.Picture, goObj(go.Picture,
{ {
margin: 0, margin: 0,
...@@ -290,7 +290,7 @@ class TopologyComponent extends Component { ...@@ -290,7 +290,7 @@ class TopologyComponent extends Component {
fromSpot: new go.Spot(0, 0.5, -2, 0), fromSpot: new go.Spot(0, 0.5, -2, 0),
toSpot: new go.Spot(0, 0.5, -2, 0) toSpot: new go.Spot(0, 0.5, -2, 0)
}, },
{ width: 6, height: 6, portId: '',fill: 'red',stroke: null,alignment: new go.Spot(1, 1, -17, -16) }, { width: 6, height: 6, portId: '',fill: null,stroke: null,alignment: new go.Spot(1, 1, -17, -16) },
new go.Binding('portId', 'left_1') new go.Binding('portId', 'left_1')
), ),
goObj(go.Shape, goObj(go.Shape,
...@@ -298,7 +298,7 @@ class TopologyComponent extends Component { ...@@ -298,7 +298,7 @@ class TopologyComponent extends Component {
fromSpot: new go.Spot(0, 0.5, -2, 0), fromSpot: new go.Spot(0, 0.5, -2, 0),
toSpot: new go.Spot(0, 0.5, -2, 0) toSpot: new go.Spot(0, 0.5, -2, 0)
}, },
{ width: 6, height: 6, portId: '',fill: 'red',stroke: null,alignment: new go.Spot(1, 1, -17, -10) }, { width: 6, height: 6, portId: '',fill: null,stroke: null,alignment: new go.Spot(1, 1, -17, -10) },
new go.Binding('portId', 'left_2') new go.Binding('portId', 'left_2')
), ),
goObj(go.Shape, goObj(go.Shape,
...@@ -306,7 +306,7 @@ class TopologyComponent extends Component { ...@@ -306,7 +306,7 @@ class TopologyComponent extends Component {
fromSpot: new go.Spot(0, 0.5, -2, 0), fromSpot: new go.Spot(0, 0.5, -2, 0),
toSpot: new go.Spot(0, 0.5, -2, 0) toSpot: new go.Spot(0, 0.5, -2, 0)
}, },
{ width: 6, height: 6, portId: '',fill: 'red',stroke: null,alignment: new go.Spot(1, 1, -17, -4) }, { width: 6, height: 6, portId: '',fill: null,stroke: null,alignment: new go.Spot(1, 1, -17, -4) },
new go.Binding('portId', 'left_3') new go.Binding('portId', 'left_3')
), ),
goObj(go.Shape, goObj(go.Shape,
...@@ -314,7 +314,7 @@ class TopologyComponent extends Component { ...@@ -314,7 +314,7 @@ class TopologyComponent extends Component {
fromSpot: new go.Spot(0, 0.5, -2, 0), fromSpot: new go.Spot(0, 0.5, -2, 0),
toSpot: new go.Spot(0, 0.5, -2, 0) toSpot: new go.Spot(0, 0.5, -2, 0)
}, },
{ width: 6, height: 6, portId: '',fill: 'red',stroke: null,alignment: new go.Spot(1, 1, -17, 2) }, { width: 6, height: 6, portId: '',fill: null,stroke: null,alignment: new go.Spot(1, 1, -17, 2) },
new go.Binding('portId', 'left_4') new go.Binding('portId', 'left_4')
), ),
goObj(go.Shape, goObj(go.Shape,
...@@ -322,7 +322,7 @@ class TopologyComponent extends Component { ...@@ -322,7 +322,7 @@ class TopologyComponent extends Component {
fromSpot: new go.Spot(0, 0.5, -2, 0), fromSpot: new go.Spot(0, 0.5, -2, 0),
toSpot: new go.Spot(0, 0.5, -2, 0) toSpot: new go.Spot(0, 0.5, -2, 0)
}, },
{ width: 6, height: 6, portId: '',fill: 'red',stroke: null,alignment: new go.Spot(1, 1, -17, 8) }, { width: 6, height: 6, portId: '',fill: null,stroke: null,alignment: new go.Spot(1, 1, -17, 8) },
new go.Binding('portId', 'left_5') new go.Binding('portId', 'left_5')
), ),
goObj(go.Shape, goObj(go.Shape,
...@@ -330,7 +330,7 @@ class TopologyComponent extends Component { ...@@ -330,7 +330,7 @@ class TopologyComponent extends Component {
fromSpot: new go.Spot(1, 0.5, 2, 0), fromSpot: new go.Spot(1, 0.5, 2, 0),
toSpot: new go.Spot(1, 0.5, 2, 0) toSpot: new go.Spot(1, 0.5, 2, 0)
}, },
{ width: 6, height: 6, portId: '',fill: 'red',stroke: null,alignment: new go.Spot(1, 1, 14, -16) }, { width: 6, height: 6, portId: '',fill: null,stroke: null,alignment: new go.Spot(1, 1, 14, -16) },
new go.Binding('portId', 'right_1') new go.Binding('portId', 'right_1')
), ),
goObj(go.Shape, goObj(go.Shape,
...@@ -338,7 +338,7 @@ class TopologyComponent extends Component { ...@@ -338,7 +338,7 @@ class TopologyComponent extends Component {
fromSpot: new go.Spot(1, 0.5, 2, 0), fromSpot: new go.Spot(1, 0.5, 2, 0),
toSpot: new go.Spot(1, 0.5, 2, 0) toSpot: new go.Spot(1, 0.5, 2, 0)
}, },
{ width: 6, height: 6, portId: '',fill: 'red',stroke: null,alignment: new go.Spot(1, 1, 14, -10) }, { width: 6, height: 6, portId: '',fill: null,stroke: null,alignment: new go.Spot(1, 1, 14, -10) },
new go.Binding('portId', 'right_2') new go.Binding('portId', 'right_2')
), ),
goObj(go.Shape, goObj(go.Shape,
...@@ -346,7 +346,7 @@ class TopologyComponent extends Component { ...@@ -346,7 +346,7 @@ class TopologyComponent extends Component {
fromSpot: new go.Spot(1, 0.5, 2, 0), fromSpot: new go.Spot(1, 0.5, 2, 0),
toSpot: new go.Spot(1, 0.5, 2, 0) toSpot: new go.Spot(1, 0.5, 2, 0)
}, },
{ width: 6, height: 6, portId: '',fill: 'red',stroke: null,alignment: new go.Spot(1, 1, 14, -4) }, { width: 6, height: 6, portId: '',fill: null,stroke: null,alignment: new go.Spot(1, 1, 14, -4) },
new go.Binding('portId', 'right_3') new go.Binding('portId', 'right_3')
), ),
goObj(go.Shape, goObj(go.Shape,
...@@ -354,7 +354,7 @@ class TopologyComponent extends Component { ...@@ -354,7 +354,7 @@ class TopologyComponent extends Component {
fromSpot: new go.Spot(1, 0.5, 2, 0), fromSpot: new go.Spot(1, 0.5, 2, 0),
toSpot: new go.Spot(1, 0.5, 2, 0) toSpot: new go.Spot(1, 0.5, 2, 0)
}, },
{ width: 6, height: 6, portId: '',fill: 'red',stroke: null,alignment: new go.Spot(1, 1, 14, 2) }, { width: 6, height: 6, portId: '',fill: null,stroke: null,alignment: new go.Spot(1, 1, 14, 2) },
new go.Binding('portId', 'right_4') new go.Binding('portId', 'right_4')
), ),
goObj(go.Shape, goObj(go.Shape,
...@@ -362,7 +362,7 @@ class TopologyComponent extends Component { ...@@ -362,7 +362,7 @@ class TopologyComponent extends Component {
fromSpot: new go.Spot(1, 0.5, 2, 0), fromSpot: new go.Spot(1, 0.5, 2, 0),
toSpot: new go.Spot(1, 0.5, 2, 0) toSpot: new go.Spot(1, 0.5, 2, 0)
}, },
{ width: 6, height: 6, portId: '',fill: 'red',stroke: null,alignment: new go.Spot(1, 1, 14, 8) }, { width: 6, height: 6, portId: '',fill: null,stroke: null,alignment: new go.Spot(1, 1, 14, 8) },
new go.Binding('portId', 'right_5') new go.Binding('portId', 'right_5')
) )
), ),
...@@ -560,8 +560,8 @@ class TopologyComponent extends Component { ...@@ -560,8 +560,8 @@ class TopologyComponent extends Component {
this.diagram.linkTemplate = this.diagram.linkTemplate =
goObj(go.Link, goObj(go.Link,
{ {
fromEndSegmentLength: 20, //设置箭头后线长度 fromEndSegmentLength: 40, //设置箭头后线长度
toEndSegmentLength: 20, //设置箭头后线长度 toEndSegmentLength: 40, //设置箭头后线长度
adjusting: go.Link.Stretch, adjusting: go.Link.Stretch,
curve: go.Link.JumpGap, curve: go.Link.JumpGap,
corner: 2 corner: 2
......
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