|
|
@ -82,8 +82,8 @@ export default { |
|
|
|
this.canvasFlow.fillText(text, { ...textOptions, x: x + width + 3, y: y + height / 2, }, { height }); |
|
|
|
} |
|
|
|
}, |
|
|
|
drawLine({ x, y, width, height, backgroundColor, linearGradient, }) { |
|
|
|
|
|
|
|
drawLine({ x, y, vertices }) { |
|
|
|
this.canvasFlow.drawLine({ x, y, color: '#154D6A', lineWidth: 6 }, vertices); |
|
|
|
}, |
|
|
|
draw() { |
|
|
|
const { clientWidth } = this.$refs.FlowCanvasRef; |
|
|
@ -202,11 +202,67 @@ export default { |
|
|
|
|
|
|
|
const linePoints = [ |
|
|
|
{ |
|
|
|
x: clientWidth / 7 - halfWidth, |
|
|
|
y: 1 |
|
|
|
x: blockList[0].options.x + blockList[0].options.width / 2, |
|
|
|
y: blockList[0].options.y + blockList[0].options.height, |
|
|
|
vertices: [ |
|
|
|
{ |
|
|
|
x: blockList[0].options.x + blockList[0].options.width / 2, |
|
|
|
y: blockList[2].options.y + blockList[2].options.height / 2 |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
x: blockList[2].options.x + blockList[2].options.width / 2, |
|
|
|
y: blockList[2].options.y + blockList[2].options.height / 2, |
|
|
|
vertices: [ |
|
|
|
{ |
|
|
|
x: blockList[3].options.x + blockList[3].options.width / 2, |
|
|
|
y: blockList[2].options.y + blockList[2].options.height / 2, |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
x: blockList[0].options.x + blockList[0].options.width / 2, |
|
|
|
y: blockList[4].options.y, |
|
|
|
vertices: [ |
|
|
|
{ |
|
|
|
x: blockList[0].options.x + blockList[0].options.width / 2, |
|
|
|
y: blockList[5].options.y, |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
x: blockList[2].options.x + blockList[2].options.width / 2, |
|
|
|
y: blockList[2].options.y + blockList[2].options.height, |
|
|
|
vertices: [ |
|
|
|
{ |
|
|
|
x: blockList[2].options.x + blockList[2].options.width / 2, |
|
|
|
y: blockList[4].options.y + blockList[4].options.height / 2, |
|
|
|
}, |
|
|
|
{ |
|
|
|
x: blockList[4].options.x, |
|
|
|
y: blockList[4].options.y + blockList[4].options.height / 2, |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
x: blockList[3].options.x + blockList[3].options.width / 2, |
|
|
|
y: blockList[3].options.y + blockList[3].options.height, |
|
|
|
vertices: [ |
|
|
|
{ |
|
|
|
x: blockList[3].options.x + blockList[3].options.width / 2, |
|
|
|
y: blockList[4].options.y + blockList[4].options.height / 2, |
|
|
|
}, |
|
|
|
{ |
|
|
|
x: blockList[4].options.x - blockList[3].options.width, |
|
|
|
y: blockList[4].options.y + blockList[4].options.height / 2, |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
]; |
|
|
|
|
|
|
|
linePoints.forEach(item => this.drawLine(item)); |
|
|
|
|
|
|
|
[...blockList, ...legends].forEach(item => { |
|
|
|
this[item.type]?.(item.options) |
|
|
|
}) |
|
|
|