Skip to content

Commit

Permalink
fix:remove parseLabel conditional judgment
Browse files Browse the repository at this point in the history
  • Loading branch information
pomelo-nwu committed Feb 8, 2021
1 parent ffbfb6a commit 8df518e
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions packages/graphin/src/shape/graphin-circle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,19 +224,17 @@ export default () => {
const keyShape = group.addShape('circle', parseKeyshape(style));

// 文本
if (label && label.value) {
group.addShape('text', parseLabel(style));
}

group.addShape('text', parseLabel(style));

// keyShape 中间的 icon
if (icon && icon.type) {
const { type } = icon;
if (type === 'text' || type === 'font') {
group.addShape('text', parseIcon(style));
}
if (type === 'image') {
group.addShape('image', parseIcon(style));
}

const { type } = icon;
if (type === 'text' || type === 'font') {
group.addShape('text', parseIcon(style));
}
if (type === 'image') {
group.addShape('image', parseIcon(style));
}

// badges 会存在多个的情况
Expand Down

0 comments on commit 8df518e

Please sign in to comment.