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

This commit is contained in:
cjc 2022-02-21 16:20:58 +08:00
parent ee9a5202b1
commit 3835b9b910
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;