|
@@ -361,18 +361,34 @@ export default class ListenLayer {
|
|
|
return circleInfo;
|
|
|
}
|
|
|
}
|
|
|
- distance = this.getDistance(position, circle.center);
|
|
|
- if (distance < circle.radius) {
|
|
|
- if (circleInfo.circleId == null || distance < circleInfo.distance) {
|
|
|
- circleInfo = {
|
|
|
- circleId: circleId,
|
|
|
- type: VectorType.Circle,
|
|
|
- distance: distance,
|
|
|
- x: circle.center.x,
|
|
|
- y: circle.center.y,
|
|
|
- index: -1,
|
|
|
- };
|
|
|
- }
|
|
|
+
|
|
|
+ // distance = this.getDistance(position, circle.center);
|
|
|
+ // if (distance < circle.radius) {
|
|
|
+ // if (circleInfo.circleId == null || distance < circleInfo.distance) {
|
|
|
+ // circleInfo = {
|
|
|
+ // circleId: circleId,
|
|
|
+ // type: VectorType.Circle,
|
|
|
+ // distance: distance,
|
|
|
+ // x: circle.center.x,
|
|
|
+ // y: circle.center.y,
|
|
|
+ // index: -1,
|
|
|
+ // };
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ const flag = mathUtil.isPointInElliptic(
|
|
|
+ position,
|
|
|
+ circle.center,
|
|
|
+ circle.radiusX,
|
|
|
+ circle.radiusY
|
|
|
+ );
|
|
|
+ if (flag) {
|
|
|
+ circleInfo = {
|
|
|
+ circleId: circleId,
|
|
|
+ type: VectorType.Circle,
|
|
|
+ x: circle.center.x,
|
|
|
+ y: circle.center.y,
|
|
|
+ index: -1,
|
|
|
+ };
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1215,14 +1231,14 @@ export default class ListenLayer {
|
|
|
);
|
|
|
} else if (this.modifyPoint.magnifierId) {
|
|
|
// if (this.modifyPoint.index == 0) {
|
|
|
- //点击隐藏的放大镜不显示
|
|
|
- stateService.setSelectItem(
|
|
|
- this.modifyPoint.magnifierId,
|
|
|
- VectorType.Magnifier,
|
|
|
- this.modifyPoint.index
|
|
|
- );
|
|
|
+ //点击隐藏的放大镜不显示
|
|
|
+ stateService.setSelectItem(
|
|
|
+ this.modifyPoint.magnifierId,
|
|
|
+ VectorType.Magnifier,
|
|
|
+ this.modifyPoint.index
|
|
|
+ );
|
|
|
// } else {
|
|
|
- stateService.setSelectState(this.modifyPoint.index);
|
|
|
+ stateService.setSelectState(this.modifyPoint.index);
|
|
|
// }
|
|
|
} else if (this.modifyPoint.linkedEdgeId) {
|
|
|
stateService.setSelectItem(
|