Merge branch 'hotfix/cjc' into 'main'

修复外部指针文字覆盖的bug

See merge request phenomLi/StructV2!6
This commit is contained in:
chen jiancheng 2022-02-21 08:32:59 +00:00
commit 849f289217
2 changed files with 11598 additions and 29 deletions

11621
dist/sv.js vendored

File diff suppressed because one or more lines are too long

View File

@ -40,9 +40,10 @@ export default Util.registerShape('pointer', {
});
const { width: textWidth, height: textHeight } = text.getBBox();
const {width: pointerWidth, height: pointerHeight} = keyShape.getBBox();
bgRect.attr({
width: textWidth + 6,
height: textHeight + 6
width: textWidth + pointerWidth + 6,
height: textHeight + pointerHeight + 6
});
// 旋转文字
@ -61,6 +62,7 @@ export default Util.registerShape('pointer', {
y: textY - textHeight / 2 - 3
});
}
return bgRect;
}
return keyShape;