|
@@ -957,12 +957,82 @@ export default class ListenLayer {
|
|
|
*/
|
|
|
setModifyPoint(position, info) {
|
|
|
//优先级最高
|
|
|
- if (
|
|
|
+ this.modifyPoint = {};
|
|
|
+ if (info && info.textInfo.textId) {
|
|
|
+ this.modifyPoint = {};
|
|
|
+ this.modifyPoint.textId = info.textInfo.textId;
|
|
|
+ this.modifyPoint.x = info.textInfo.x;
|
|
|
+ this.modifyPoint.y = info.textInfo.y;
|
|
|
+ } else if (info && info.magnifierInfo.magnifierId) {
|
|
|
+ this.modifyPoint = {};
|
|
|
+ this.modifyPoint.magnifierId = info.magnifierInfo.magnifierId;
|
|
|
+ this.modifyPoint.index = info.magnifierInfo.index;
|
|
|
+ this.modifyPoint.x = info.magnifierInfo.x;
|
|
|
+ this.modifyPoint.y = info.magnifierInfo.y;
|
|
|
+ } else if (info && info.circleInfo.circleId) {
|
|
|
+ this.modifyPoint = {};
|
|
|
+ this.modifyPoint.linkedCircleId = info.circleInfo.circleId;
|
|
|
+ this.modifyPoint.index = info.circleInfo.index;
|
|
|
+ this.modifyPoint.x = info.circleInfo.x;
|
|
|
+ this.modifyPoint.y = info.circleInfo.y;
|
|
|
+ } else if (
|
|
|
+ info &&
|
|
|
+ (info.pointInfo.pointId || info.curvePointInfo.curvePointId)
|
|
|
+ ) {
|
|
|
+ this.modifyPoint = {};
|
|
|
+ if (info.pointInfo.pointId && info.curvePointInfo.curvePointId) {
|
|
|
+ if (info.pointInfo.distance < info.curvePointInfo.distance) {
|
|
|
+ this.modifyPoint.linkedPointId = info.pointInfo.pointId;
|
|
|
+ this.modifyPoint.x = info.pointInfo.x;
|
|
|
+ this.modifyPoint.y = info.pointInfo.y;
|
|
|
+ } else {
|
|
|
+ this.modifyPoint.linkedCurvePointId =
|
|
|
+ info.curvePointInfo.curvePointId;
|
|
|
+ this.modifyPoint.x = info.curvePointInfo.x;
|
|
|
+ this.modifyPoint.y = info.curvePointInfo.y;
|
|
|
+ }
|
|
|
+ } else if (info.pointInfo.pointId) {
|
|
|
+ this.modifyPoint.linkedPointId = info.pointInfo.pointId;
|
|
|
+ this.modifyPoint.x = info.pointInfo.x;
|
|
|
+ this.modifyPoint.y = info.pointInfo.y;
|
|
|
+ } else if (info.curvePointInfo.curvePointId) {
|
|
|
+ this.modifyPoint.linkedCurvePointId = info.curvePointInfo.curvePointId;
|
|
|
+ this.modifyPoint.x = info.curvePointInfo.x;
|
|
|
+ this.modifyPoint.y = info.curvePointInfo.y;
|
|
|
+ }
|
|
|
+ } else if (
|
|
|
+ info &&
|
|
|
+ (info.lineInfo.lineId || info.curveLineInfo.curveLineId)
|
|
|
+ ) {
|
|
|
+ this.modifyPoint = {};
|
|
|
+ if (info.lineInfo.lineId && info.curveLineInfo.curveLineId) {
|
|
|
+ if (info.lineInfo.distance < info.curveLineInfo.distance) {
|
|
|
+ this.modifyPoint.linkedLineId = info.lineInfo.lineId;
|
|
|
+ this.modifyPoint.x = info.lineInfo.x;
|
|
|
+ this.modifyPoint.y = info.lineInfo.y;
|
|
|
+ } else {
|
|
|
+ this.modifyPoint.linkedCurveLineId = info.curveLineInfo.curveLineId;
|
|
|
+ this.modifyPoint.x = info.curveLineInfo.x;
|
|
|
+ this.modifyPoint.y = info.curveLineInfo.y;
|
|
|
+ }
|
|
|
+ } else if (info.lineInfo.lineId) {
|
|
|
+ this.modifyPoint.linkedLineId = info.lineInfo.lineId;
|
|
|
+ this.modifyPoint.x = info.lineInfo.x;
|
|
|
+ this.modifyPoint.y = info.lineInfo.y;
|
|
|
+ } else if (info.curveLineInfo.curveLineId) {
|
|
|
+ this.modifyPoint.linkedCurveLineId = info.curveLineInfo.curveLineId;
|
|
|
+ this.modifyPoint.x = info.curveLineInfo.x;
|
|
|
+ this.modifyPoint.y = info.curveLineInfo.y;
|
|
|
+ }
|
|
|
+ } else if (info && info.svgInfo.svgId) {
|
|
|
+ this.modifyPoint = {};
|
|
|
+ this.modifyPoint.svgId = info.svgInfo.svgId;
|
|
|
+ this.modifyPoint.index = info.svgInfo.index;
|
|
|
+ } else if (
|
|
|
info &&
|
|
|
(info.roadPointInfo.roadPointId ||
|
|
|
info.curveRoadPointInfo.curveRoadPointId)
|
|
|
) {
|
|
|
- this.modifyPoint = {};
|
|
|
if (
|
|
|
info.roadPointInfo.roadPointId &&
|
|
|
info.curveRoadPointInfo.curveRoadPointId
|
|
@@ -989,31 +1059,6 @@ export default class ListenLayer {
|
|
|
}
|
|
|
} else if (
|
|
|
info &&
|
|
|
- (info.pointInfo.pointId || info.curvePointInfo.curvePointId)
|
|
|
- ) {
|
|
|
- this.modifyPoint = {};
|
|
|
- if (info.pointInfo.pointId && info.curvePointInfo.curvePointId) {
|
|
|
- if (info.pointInfo.distance < info.curvePointInfo.distance) {
|
|
|
- this.modifyPoint.linkedPointId = info.pointInfo.pointId;
|
|
|
- this.modifyPoint.x = info.pointInfo.x;
|
|
|
- this.modifyPoint.y = info.pointInfo.y;
|
|
|
- } else {
|
|
|
- this.modifyPoint.linkedCurvePointId =
|
|
|
- info.curvePointInfo.curvePointId;
|
|
|
- this.modifyPoint.x = info.curvePointInfo.x;
|
|
|
- this.modifyPoint.y = info.curvePointInfo.y;
|
|
|
- }
|
|
|
- } else if (info.pointInfo.pointId) {
|
|
|
- this.modifyPoint.linkedPointId = info.pointInfo.pointId;
|
|
|
- this.modifyPoint.x = info.pointInfo.x;
|
|
|
- this.modifyPoint.y = info.pointInfo.y;
|
|
|
- } else if (info.curvePointInfo.curvePointId) {
|
|
|
- this.modifyPoint.linkedCurvePointId = info.curvePointInfo.curvePointId;
|
|
|
- this.modifyPoint.x = info.curvePointInfo.x;
|
|
|
- this.modifyPoint.y = info.curvePointInfo.y;
|
|
|
- }
|
|
|
- } else if (
|
|
|
- info &&
|
|
|
(info.roadEdgeInfo.roadId || info.curveRoadEdgeInfo.curveRoadId)
|
|
|
) {
|
|
|
this.modifyPoint = {};
|
|
@@ -1040,23 +1085,6 @@ export default class ListenLayer {
|
|
|
this.modifyPoint.y = info.curveRoadEdgeInfo.y;
|
|
|
this.modifyPoint.dir = info.curveRoadEdgeInfo.dir;
|
|
|
}
|
|
|
- } else if (info && info.crossPointInfo.crossCrossPointId) {
|
|
|
- this.modifyPoint = {};
|
|
|
- this.modifyPoint.linkedCrossCrossPointId =
|
|
|
- info.crossPointInfo.crossCrossPointId;
|
|
|
- this.modifyPoint.x = info.crossPointInfo.x;
|
|
|
- this.modifyPoint.y = info.crossPointInfo.y;
|
|
|
- } else if (info && info.textInfo.textId) {
|
|
|
- this.modifyPoint = {};
|
|
|
- this.modifyPoint.textId = info.textInfo.textId;
|
|
|
- this.modifyPoint.x = info.textInfo.x;
|
|
|
- this.modifyPoint.y = info.textInfo.y;
|
|
|
- } else if (info && info.magnifierInfo.magnifierId) {
|
|
|
- this.modifyPoint = {};
|
|
|
- this.modifyPoint.magnifierId = info.magnifierInfo.magnifierId;
|
|
|
- this.modifyPoint.index = info.magnifierInfo.index;
|
|
|
- this.modifyPoint.x = info.magnifierInfo.x;
|
|
|
- this.modifyPoint.y = info.magnifierInfo.y;
|
|
|
} else if (
|
|
|
info &&
|
|
|
(info.roadEdgeInfo.edgeId || info.curveRoadEdgeInfo.curveEdgeId)
|
|
@@ -1084,40 +1112,12 @@ export default class ListenLayer {
|
|
|
this.modifyPoint.x = info.curveRoadEdgeInfo.x;
|
|
|
this.modifyPoint.y = info.curveRoadEdgeInfo.y;
|
|
|
}
|
|
|
- } else if (
|
|
|
- info &&
|
|
|
- (info.lineInfo.lineId || info.curveLineInfo.curveLineId)
|
|
|
- ) {
|
|
|
- this.modifyPoint = {};
|
|
|
- if (info.lineInfo.lineId && info.curveLineInfo.curveLineId) {
|
|
|
- if (info.lineInfo.distance < info.curveLineInfo.distance) {
|
|
|
- this.modifyPoint.linkedLineId = info.lineInfo.lineId;
|
|
|
- this.modifyPoint.x = info.lineInfo.x;
|
|
|
- this.modifyPoint.y = info.lineInfo.y;
|
|
|
- } else {
|
|
|
- this.modifyPoint.linkedCurveLineId = info.curveLineInfo.curveLineId;
|
|
|
- this.modifyPoint.x = info.curveLineInfo.x;
|
|
|
- this.modifyPoint.y = info.curveLineInfo.y;
|
|
|
- }
|
|
|
- } else if (info.lineInfo.lineId) {
|
|
|
- this.modifyPoint.linkedLineId = info.lineInfo.lineId;
|
|
|
- this.modifyPoint.x = info.lineInfo.x;
|
|
|
- this.modifyPoint.y = info.lineInfo.y;
|
|
|
- } else if (info.curveLineInfo.curveLineId) {
|
|
|
- this.modifyPoint.linkedCurveLineId = info.curveLineInfo.curveLineId;
|
|
|
- this.modifyPoint.x = info.curveLineInfo.x;
|
|
|
- this.modifyPoint.y = info.curveLineInfo.y;
|
|
|
- }
|
|
|
- } else if (info && info.circleInfo.circleId) {
|
|
|
- this.modifyPoint = {};
|
|
|
- this.modifyPoint.linkedCircleId = info.circleInfo.circleId;
|
|
|
- this.modifyPoint.index = info.circleInfo.index;
|
|
|
- this.modifyPoint.x = info.circleInfo.x;
|
|
|
- this.modifyPoint.y = info.circleInfo.y;
|
|
|
- } else if (info && info.svgInfo.svgId) {
|
|
|
+ } else if (info && info.crossPointInfo.crossCrossPointId) {
|
|
|
this.modifyPoint = {};
|
|
|
- this.modifyPoint.svgId = info.svgInfo.svgId;
|
|
|
- this.modifyPoint.index = info.svgInfo.index;
|
|
|
+ this.modifyPoint.linkedCrossCrossPointId =
|
|
|
+ info.crossPointInfo.crossCrossPointId;
|
|
|
+ this.modifyPoint.x = info.crossPointInfo.x;
|
|
|
+ this.modifyPoint.y = info.crossPointInfo.y;
|
|
|
} else if (info && info.roadPointInfo.linkedRoadPointIdX) {
|
|
|
this.modifyPoint = {};
|
|
|
this.modifyPoint.linkedRoadPointIdX =
|