(start, end)
| 89 | |
| 90 | // 画线 - 返回 样式 对象 |
| 91 | drawLine(start, end) { |
| 92 | const width = this.getPointDis(start.x, start.y, end.x, end.y); |
| 93 | const rotate = this.getAngle(start, end); |
| 94 | |
| 95 | return { |
| 96 | activeLeft: start.x + 'px', |
| 97 | activeTop: start.y + 'px', |
| 98 | activeWidth: width + 'px', |
| 99 | activeRotate: rotate + 'deg' |
| 100 | } |
| 101 | |
| 102 | } |
| 103 | |
| 104 | // 获取 画线的 角度 |
| 105 | getAngle(start, end) { |
no test coverage detected