update 编辑流程节点
This commit is contained in:
@@ -123,45 +123,19 @@ export default {
|
||||
const nodeColorIndex = cfg.depth % NODE_COLOR.length
|
||||
const nodeStyle = NODE_COLOR[nodeColorIndex]
|
||||
// 节点整体的内容
|
||||
const nodeContainer = group.addShape('rect', {})
|
||||
// 实际显示的边框,由三部分组成,左右两侧是两个圆,中间用两个矩形覆盖,一个有边框,另一个没有边框,没有边框这个高小一点,宽大一点
|
||||
group.addShape('circle', {
|
||||
const nodeContainer = group.addShape('rect', {
|
||||
attrs: {
|
||||
x: this.nodeHeight / 2,
|
||||
y: this.nodeHeight / 2,
|
||||
r: this.nodeHeight / 2,
|
||||
stroke: nodeStyle.stroke,
|
||||
fill: nodeStyle.bg
|
||||
}
|
||||
})
|
||||
group.addShape('circle', {
|
||||
attrs: {
|
||||
x: this.nodeWidth - this.nodeHeight / 2,
|
||||
y: this.nodeHeight / 2,
|
||||
r: this.nodeHeight / 2,
|
||||
stroke: nodeStyle.stroke,
|
||||
fill: nodeStyle.bg
|
||||
}
|
||||
})
|
||||
group.addShape('rect', {
|
||||
attrs: {
|
||||
x: this.nodeHeight / 2,
|
||||
y: 0,
|
||||
width: this.nodeWidth - this.nodeHeight,
|
||||
width: this.nodeWidth,
|
||||
height: this.nodeHeight,
|
||||
stroke: nodeStyle.stroke,
|
||||
fill: nodeStyle.bg
|
||||
}
|
||||
})
|
||||
group.addShape('rect', {
|
||||
attrs: {
|
||||
x: this.nodeHeight / 2 - 3,
|
||||
y: 0.5,
|
||||
width: this.nodeWidth - this.nodeHeight + 6,
|
||||
height: this.nodeHeight - 1,
|
||||
fill: nodeStyle.bg
|
||||
}
|
||||
radius: this.nodeHeight / 2,
|
||||
fill: nodeStyle.bg,
|
||||
stroke: nodeStyle.stroke
|
||||
},
|
||||
name: 'rect-shape'
|
||||
})
|
||||
|
||||
// 文本的部分
|
||||
let textContent = cfg.name || ''
|
||||
if (textContent.length > 40) {
|
||||
@@ -184,7 +158,7 @@ export default {
|
||||
// 展开收起
|
||||
group.addShape('marker', {
|
||||
attrs: {
|
||||
x: this.nodeWidth + NODE_ICON_MARGIN,
|
||||
x: this.nodeWidth + NODE_ICON_MARGIN + this.expendCollapseIconR,
|
||||
y: this.nodeHeight / 2,
|
||||
r: this.expendCollapseIconR,
|
||||
symbol: COLLAPSE_ICON,
|
||||
|
||||
@@ -102,6 +102,7 @@ const updateColorWeak = colorWeak => {
|
||||
const updatePageHeight = () => {
|
||||
const isEmbedded = store.getters.isEmbedded
|
||||
const obj = {
|
||||
'primary-color': '#D52C26',
|
||||
'user-info-height': isEmbedded ? '0px' : '59px', // 用户信息的高度
|
||||
'breadcrumb-height': isEmbedded ? '12px' : '45px' // 面包屑的高度
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user