({
x,
y
})
| 66 | |
| 67 | // 检测当时 触摸位置是否位于 锁上 |
| 68 | checkTouch({ |
| 69 | x, |
| 70 | y |
| 71 | }) { |
| 72 | for (let i = 0; i < this.circleArray.length; i++) { |
| 73 | let point = this.circleArray[i]; |
| 74 | if (this.isPointInCycle(x, y, point.x, point.y, point.radius)) { |
| 75 | if (!point.check) { |
| 76 | this.checkPoints.push(point.count); |
| 77 | if (this.lastCheckPoint != 0) { |
| 78 | // 已激活锁之间的线段 |
| 79 | const line = this.drawLine(this.lastCheckPoint, point); |
| 80 | this.lineArray.push(line); |
| 81 | } |
| 82 | this.lastCheckPoint = point; |
| 83 | } |
| 84 | point.check = true; |
| 85 | return; |
| 86 | } |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | // 画线 - 返回 样式 对象 |
| 91 | drawLine(start, end) { |
no test coverage detected