(this: Model<LabelRectRelatedOption> & TextStyleMixin, text: string)
| 65 | } |
| 66 | |
| 67 | getTextRect(this: Model<LabelRectRelatedOption> & TextStyleMixin, text: string): graphicUtil.BoundingRect { |
| 68 | const style: TextStyleProps = { |
| 69 | text: text, |
| 70 | verticalAlign: this.getShallow('verticalAlign') |
| 71 | || this.getShallow('baseline') |
| 72 | }; |
| 73 | for (let i = 0; i < textStyleParams.length; i++) { |
| 74 | (style as any)[textStyleParams[i]] = this.getShallow(textStyleParams[i]); |
| 75 | } |
| 76 | tmpText.useStyle(style); |
| 77 | tmpText.update(); |
| 78 | return tmpText.getBoundingRect(); |
| 79 | } |
| 80 | }; |
| 81 | |
| 82 | export default TextStyleMixin; |
no test coverage detected