(highlight: INode)
| 301 | } |
| 302 | |
| 303 | private _getHighlightRect(highlight: INode) { |
| 304 | const svgNode = this.svg.node()!; |
| 305 | const transform = zoomTransform(svgNode); |
| 306 | const padding = 4 / transform.k; |
| 307 | const rect = { |
| 308 | ...highlight.state.rect, |
| 309 | }; |
| 310 | rect.x -= padding; |
| 311 | rect.y -= padding; |
| 312 | rect.width += 2 * padding; |
| 313 | rect.height += 2 * padding; |
| 314 | return rect; |
| 315 | } |
| 316 | |
| 317 | async renderData(originData?: INode) { |
| 318 | const { paddingX, autoFit, color, maxWidth, lineWidth } = this.options; |