|
@@ -128,7 +128,7 @@ Graph.registerPortLayout('start', (portsPositionArgs, elemBBox) => {
|
|
|
return {
|
|
|
position: {
|
|
|
x: 3,
|
|
|
- y: 25 + 3,
|
|
|
+ y: 25 + 7,
|
|
|
},
|
|
|
}
|
|
|
})
|
|
@@ -143,8 +143,8 @@ Graph.registerPortLayout('end', (portsPositionArgs, elemBBox) => {
|
|
|
return portsPositionArgs.map((_, index) => {
|
|
|
return {
|
|
|
position: {
|
|
|
- x: elemBBox.width + 3,
|
|
|
- y: 25 + 3,
|
|
|
+ x: elemBBox.width + 11,
|
|
|
+ y: 25 + 7,
|
|
|
},
|
|
|
}
|
|
|
})
|
|
@@ -162,7 +162,7 @@ Graph.registerPortLayout('more', (portsPositionArgs, elemBBox) => {
|
|
|
})
|
|
|
return {
|
|
|
position: {
|
|
|
- x: elemBBox.width + 3,
|
|
|
+ x: elemBBox.width + 11,
|
|
|
y: _.dy,
|
|
|
},
|
|
|
}
|
|
@@ -236,6 +236,34 @@ const initChart = () => {
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
+ highlighting: {
|
|
|
+ // 连接桩可以被连接时在连接桩外围围渲染一个包围框
|
|
|
+ magnetAvailable: {
|
|
|
+ name: 'stroke',
|
|
|
+ args: {
|
|
|
+ rx: 100,
|
|
|
+ ry: 100,
|
|
|
+ attrs: {
|
|
|
+ fill: '#fff',
|
|
|
+ stroke: 'rgba(var(--czr-main-color-rgb), 0.5)',
|
|
|
+ 'stroke-width': 3,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ // 连接桩吸附连线时在连接桩外围围渲染一个包围框
|
|
|
+ magnetAdsorbed: {
|
|
|
+ name: 'stroke',
|
|
|
+ args: {
|
|
|
+ rx: 100,
|
|
|
+ ry: 100,
|
|
|
+ attrs: {
|
|
|
+ fill: '#fff',
|
|
|
+ stroke: 'rgba(var(--czr-main-color-rgb), 1)',
|
|
|
+ 'stroke-width': 3,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
connecting: {
|
|
|
snap: { // 连线过程中自动吸附
|
|
|
radius: 20,
|