Feat:节点矩形形状改为使用path渲染
This commit is contained in:
parent
a24f7a73c8
commit
1b0646af6d
@ -104,11 +104,18 @@ export default class Shape {
|
|||||||
let { width, height } = this.node
|
let { width, height } = this.node
|
||||||
let borderRadius = this.node.style.merge('borderRadius')
|
let borderRadius = this.node.style.merge('borderRadius')
|
||||||
return new Path().plot(`
|
return new Path().plot(`
|
||||||
M${0},0
|
M${borderRadius},0
|
||||||
L${width},0
|
L${width - borderRadius},0
|
||||||
L${width},${height}
|
C${width - borderRadius},0 ${width},${0} ${width},${borderRadius}
|
||||||
L${0},${height}
|
L${width},${height - borderRadius}
|
||||||
L${0},${0}
|
C${width},${height - borderRadius} ${width},${height} ${
|
||||||
|
width - borderRadius
|
||||||
|
},${height}
|
||||||
|
L${borderRadius},${height}
|
||||||
|
C${borderRadius},${height} ${0},${height} ${0},${height - borderRadius}
|
||||||
|
L${0},${borderRadius}
|
||||||
|
C${0},${borderRadius} ${0},${0} ${borderRadius},${0}
|
||||||
|
Z
|
||||||
`)
|
`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user