|
@@ -159,11 +159,7 @@ export default class Layer {
|
|
stateService.setEventName(LayerEvents.MovePoint);
|
|
stateService.setEventName(LayerEvents.MovePoint);
|
|
const newPoint = addPoint.buildPoint(position);
|
|
const newPoint = addPoint.buildPoint(position);
|
|
if (newPoint) {
|
|
if (newPoint) {
|
|
- stateService.setSelectItem(
|
|
|
|
- newPoint.vectorId,
|
|
|
|
- VectorType.Point,
|
|
|
|
- SelectState.Select
|
|
|
|
- );
|
|
|
|
|
|
+ stateService.setSelectItem(newPoint.vectorId, VectorType.Point, SelectState.Select);
|
|
this.renderer.autoRedraw();
|
|
this.renderer.autoRedraw();
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
@@ -175,11 +171,7 @@ export default class Layer {
|
|
case LayerEvents.AddText:
|
|
case LayerEvents.AddText:
|
|
stateService.setEventName(LayerEvents.MoveText);
|
|
stateService.setEventName(LayerEvents.MoveText);
|
|
addText.buildText(position);
|
|
addText.buildText(position);
|
|
- stateService.setSelectItem(
|
|
|
|
- addText.newText.vectorId,
|
|
|
|
- VectorType.Text,
|
|
|
|
- SelectState.Select
|
|
|
|
- );
|
|
|
|
|
|
+ stateService.setSelectItem(addText.newText.vectorId, VectorType.Text, SelectState.Select);
|
|
addText.clear();
|
|
addText.clear();
|
|
break;
|
|
break;
|
|
case LayerEvents.AddSVG:
|
|
case LayerEvents.AddSVG:
|
|
@@ -193,11 +185,7 @@ export default class Layer {
|
|
case LayerEvents.AddMagnifier:
|
|
case LayerEvents.AddMagnifier:
|
|
stateService.setEventName(LayerEvents.MoveMagnifier);
|
|
stateService.setEventName(LayerEvents.MoveMagnifier);
|
|
addMagnifier.buildMagnifier(position);
|
|
addMagnifier.buildMagnifier(position);
|
|
- stateService.setSelectItem(
|
|
|
|
- addMagnifier.newMagnifier.vectorId,
|
|
|
|
- VectorType.Magnifier,
|
|
|
|
- SelectState.Select
|
|
|
|
- );
|
|
|
|
|
|
+ stateService.setSelectItem(addMagnifier.newMagnifier.vectorId, VectorType.Magnifier, SelectState.Select);
|
|
addMagnifier.clear();
|
|
addMagnifier.clear();
|
|
break;
|
|
break;
|
|
case VectorEvents.AddLane:
|
|
case VectorEvents.AddLane:
|
|
@@ -208,17 +196,9 @@ export default class Layer {
|
|
selectAddLaneFlag = true;
|
|
selectAddLaneFlag = true;
|
|
let roadLanCount = road.getLanesCount(selectItem.dir);
|
|
let roadLanCount = road.getLanesCount(selectItem.dir);
|
|
if (selectItem.dir == "left") {
|
|
if (selectItem.dir == "left") {
|
|
- roadService.updateForAddSubtractLanesCount(
|
|
|
|
- road.vectorId,
|
|
|
|
- roadLanCount + 1,
|
|
|
|
- selectItem.dir
|
|
|
|
- );
|
|
|
|
|
|
+ roadService.updateForAddSubtractLanesCount(road.vectorId, roadLanCount + 1, selectItem.dir);
|
|
} else {
|
|
} else {
|
|
- roadService.updateForAddSubtractLanesCount(
|
|
|
|
- road.vectorId,
|
|
|
|
- roadLanCount + 1,
|
|
|
|
- selectItem.dir
|
|
|
|
- );
|
|
|
|
|
|
+ roadService.updateForAddSubtractLanesCount(road.vectorId, roadLanCount + 1, selectItem.dir);
|
|
}
|
|
}
|
|
roadService.initRoadWidthTipsPos(road);
|
|
roadService.initRoadWidthTipsPos(road);
|
|
|
|
|
|
@@ -236,26 +216,18 @@ export default class Layer {
|
|
selectAddLaneFlag = true;
|
|
selectAddLaneFlag = true;
|
|
let curveRoadLanCount = road.getLanesCount(selectItem.dir);
|
|
let curveRoadLanCount = road.getLanesCount(selectItem.dir);
|
|
if (selectItem.dir == "left") {
|
|
if (selectItem.dir == "left") {
|
|
- curveRoadService.updateForAddSubtractLanesCount(
|
|
|
|
- road.vectorId,
|
|
|
|
- curveRoadLanCount + 1,
|
|
|
|
- selectItem.dir
|
|
|
|
- );
|
|
|
|
|
|
+ curveRoadService.updateForAddSubtractLanesCount(road.vectorId, curveRoadLanCount + 1, selectItem.dir);
|
|
} else {
|
|
} else {
|
|
- curveRoadService.updateForAddSubtractLanesCount(
|
|
|
|
- road.vectorId,
|
|
|
|
- curveRoadLanCount + 1,
|
|
|
|
- selectItem.dir
|
|
|
|
- );
|
|
|
|
|
|
+ curveRoadService.updateForAddSubtractLanesCount(road.vectorId, curveRoadLanCount + 1, selectItem.dir);
|
|
}
|
|
}
|
|
let leftEdge = dataService.getRoadEdge(road.leftEdgeId);
|
|
let leftEdge = dataService.getRoadEdge(road.leftEdgeId);
|
|
let rightEdge = dataService.getRoadEdge(road.rightEdgeId);
|
|
let rightEdge = dataService.getRoadEdge(road.rightEdgeId);
|
|
- if (leftEdge.roadSide) {
|
|
|
|
- leftEdge.initCurveRoadSide();
|
|
|
|
- }
|
|
|
|
- if (rightEdge.roadSide) {
|
|
|
|
- rightEdge.initCurveRoadSide();
|
|
|
|
- }
|
|
|
|
|
|
+ // if (leftEdge.roadSide) {
|
|
|
|
+ // leftEdge.initCurveRoadSide();
|
|
|
|
+ // }
|
|
|
|
+ // if (rightEdge.roadSide) {
|
|
|
|
+ // rightEdge.initCurveRoadSide();
|
|
|
|
+ // }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -274,17 +246,9 @@ export default class Layer {
|
|
selectDelLaneFlag = true;
|
|
selectDelLaneFlag = true;
|
|
let roadLanCount = road.getLanesCount(selectItem.dir);
|
|
let roadLanCount = road.getLanesCount(selectItem.dir);
|
|
if (selectItem.dir == "left") {
|
|
if (selectItem.dir == "left") {
|
|
- roadService.updateForAddSubtractLanesCount(
|
|
|
|
- road.vectorId,
|
|
|
|
- roadLanCount - 1,
|
|
|
|
- selectItem.dir
|
|
|
|
- );
|
|
|
|
|
|
+ roadService.updateForAddSubtractLanesCount(road.vectorId, roadLanCount - 1, selectItem.dir);
|
|
} else {
|
|
} else {
|
|
- roadService.updateForAddSubtractLanesCount(
|
|
|
|
- road.vectorId,
|
|
|
|
- roadLanCount - 1,
|
|
|
|
- selectItem.dir
|
|
|
|
- );
|
|
|
|
|
|
+ roadService.updateForAddSubtractLanesCount(road.vectorId, roadLanCount - 1, selectItem.dir);
|
|
}
|
|
}
|
|
let leftEdge = dataService.getRoadEdge(road.leftEdgeId);
|
|
let leftEdge = dataService.getRoadEdge(road.leftEdgeId);
|
|
let rightEdge = dataService.getRoadEdge(road.rightEdgeId);
|
|
let rightEdge = dataService.getRoadEdge(road.rightEdgeId);
|
|
@@ -294,35 +258,29 @@ export default class Layer {
|
|
if (rightEdge.roadSide) {
|
|
if (rightEdge.roadSide) {
|
|
rightEdge.initRoadSide();
|
|
rightEdge.initRoadSide();
|
|
}
|
|
}
|
|
|
|
+ roadService.initRoadWidthTipsPos(road);
|
|
} else {
|
|
} else {
|
|
road = dataService.getCurveRoad(selectItem.vectorId);
|
|
road = dataService.getCurveRoad(selectItem.vectorId);
|
|
if (road) {
|
|
if (road) {
|
|
selectDelLaneFlag = true;
|
|
selectDelLaneFlag = true;
|
|
let curveRoadLanCount = road.getLanesCount(selectItem.dir);
|
|
let curveRoadLanCount = road.getLanesCount(selectItem.dir);
|
|
if (selectItem.dir == "left") {
|
|
if (selectItem.dir == "left") {
|
|
- curveRoadService.updateForAddSubtractLanesCount(
|
|
|
|
- road.vectorId,
|
|
|
|
- curveRoadLanCount - 1,
|
|
|
|
- selectItem.dir
|
|
|
|
- );
|
|
|
|
|
|
+ curveRoadService.updateForAddSubtractLanesCount(road.vectorId, curveRoadLanCount - 1, selectItem.dir);
|
|
} else {
|
|
} else {
|
|
- curveRoadService.updateForAddSubtractLanesCount(
|
|
|
|
- road.vectorId,
|
|
|
|
- curveRoadLanCount - 1,
|
|
|
|
- selectItem.dir
|
|
|
|
- );
|
|
|
|
|
|
+ curveRoadService.updateForAddSubtractLanesCount(road.vectorId, curveRoadLanCount - 1, selectItem.dir);
|
|
}
|
|
}
|
|
let leftEdge = dataService.getRoadEdge(road.leftEdgeId);
|
|
let leftEdge = dataService.getRoadEdge(road.leftEdgeId);
|
|
let rightEdge = dataService.getRoadEdge(road.rightEdgeId);
|
|
let rightEdge = dataService.getRoadEdge(road.rightEdgeId);
|
|
- if (leftEdge.roadSide) {
|
|
|
|
- leftEdge.initCurveRoadSide();
|
|
|
|
- }
|
|
|
|
- if (rightEdge.roadSide) {
|
|
|
|
- rightEdge.initCurveRoadSide();
|
|
|
|
- }
|
|
|
|
|
|
+ // 暂时屏蔽 曲路暂时还没有 会报错
|
|
|
|
+ // if (leftEdge.roadSide) {
|
|
|
|
+ // leftEdge.initCurveRoadSide();
|
|
|
|
+ // }
|
|
|
|
+ // if (rightEdge.roadSide) {
|
|
|
|
+ // rightEdge.initCurveRoadSide();
|
|
|
|
+ // }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- roadService.initRoadWidthTipsPos(road);
|
|
|
|
|
|
+ // roadService.initRoadWidthTipsPos(road);
|
|
this.history.save();
|
|
this.history.save();
|
|
this.renderer.autoRedraw();
|
|
this.renderer.autoRedraw();
|
|
}
|
|
}
|
|
@@ -334,18 +292,12 @@ export default class Layer {
|
|
if (focusItem && focusItem.vectorId) {
|
|
if (focusItem && focusItem.vectorId) {
|
|
if (focusItem.type == VectorType.CurveRoad) {
|
|
if (focusItem.type == VectorType.CurveRoad) {
|
|
const curveRoad = dataService.getCurveRoad(focusItem.vectorId);
|
|
const curveRoad = dataService.getCurveRoad(focusItem.vectorId);
|
|
- let index = mathUtil.getIndexForCurvesPoints(
|
|
|
|
- position,
|
|
|
|
- curveRoad.points
|
|
|
|
- );
|
|
|
|
|
|
+ let index = mathUtil.getIndexForCurvesPoints(position, curveRoad.points);
|
|
if (index != -1) {
|
|
if (index != -1) {
|
|
curveRoadService.addCPoint(curveRoad, position, index);
|
|
curveRoadService.addCPoint(curveRoad, position, index);
|
|
} else {
|
|
} else {
|
|
const dis1 = mathUtil.getDistance(curveRoad.points[0], position);
|
|
const dis1 = mathUtil.getDistance(curveRoad.points[0], position);
|
|
- const dis2 = mathUtil.getDistance(
|
|
|
|
- curveRoad.points[curveRoad.points.length - 1],
|
|
|
|
- position
|
|
|
|
- );
|
|
|
|
|
|
+ const dis2 = mathUtil.getDistance(curveRoad.points[curveRoad.points.length - 1], position);
|
|
if (dis1 > dis2) {
|
|
if (dis1 > dis2) {
|
|
index = curveRoad.points.length - 2;
|
|
index = curveRoad.points.length - 2;
|
|
} else {
|
|
} else {
|
|
@@ -372,18 +324,12 @@ export default class Layer {
|
|
curveLine.setStyle(style);
|
|
curveLine.setStyle(style);
|
|
} else if (focusItem.type == VectorType.CurveLine) {
|
|
} else if (focusItem.type == VectorType.CurveLine) {
|
|
let curveLine = dataService.getCurveLine(focusItem.vectorId);
|
|
let curveLine = dataService.getCurveLine(focusItem.vectorId);
|
|
- let index = mathUtil.getIndexForCurvesPoints(
|
|
|
|
- position,
|
|
|
|
- curveLine.points
|
|
|
|
- );
|
|
|
|
|
|
+ let index = mathUtil.getIndexForCurvesPoints(position, curveLine.points);
|
|
if (index != -1) {
|
|
if (index != -1) {
|
|
lineService.addCPoint(position, index, focusItem.vectorId);
|
|
lineService.addCPoint(position, index, focusItem.vectorId);
|
|
} else {
|
|
} else {
|
|
const dis1 = mathUtil.getDistance(curveLine.points[0], position);
|
|
const dis1 = mathUtil.getDistance(curveLine.points[0], position);
|
|
- const dis2 = mathUtil.getDistance(
|
|
|
|
- curveLine.points[curveLine.points.length - 1],
|
|
|
|
- position
|
|
|
|
- );
|
|
|
|
|
|
+ const dis2 = mathUtil.getDistance(curveLine.points[curveLine.points.length - 1], position);
|
|
if (dis1 > dis2) {
|
|
if (dis1 > dis2) {
|
|
index = curveLine.points.length - 2;
|
|
index = curveLine.points.length - 2;
|
|
} else {
|
|
} else {
|
|
@@ -417,11 +363,7 @@ export default class Layer {
|
|
selectItem = stateService.getSelectItem();
|
|
selectItem = stateService.getSelectItem();
|
|
stateService.setDraggingItem(selectItem);
|
|
stateService.setDraggingItem(selectItem);
|
|
stateService.clearFocusItem();
|
|
stateService.clearFocusItem();
|
|
- if (
|
|
|
|
- selectItem &&
|
|
|
|
- this.uiControl.focusVector &&
|
|
|
|
- selectItem.vectorId == this.uiControl.focusVector.vectorId
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (selectItem && this.uiControl.focusVector && selectItem.vectorId == this.uiControl.focusVector.vectorId) {
|
|
} else {
|
|
} else {
|
|
this.uiControl.clearFocusVector();
|
|
this.uiControl.clearFocusVector();
|
|
}
|
|
}
|
|
@@ -486,24 +428,14 @@ export default class Layer {
|
|
y: position.y,
|
|
y: position.y,
|
|
};
|
|
};
|
|
const eventName = stateService.getEventName();
|
|
const eventName = stateService.getEventName();
|
|
- if (
|
|
|
|
- !this.dragging &&
|
|
|
|
- Math.abs(X - this.startX) < minDragDis &&
|
|
|
|
- Math.abs(Y - this.startY) < minDragDis
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (!this.dragging && Math.abs(X - this.startX) < minDragDis && Math.abs(Y - this.startY) < minDragDis) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
this.dragging = true;
|
|
this.dragging = true;
|
|
- if (
|
|
|
|
- Math.abs(X - this.startX) > minDragDis ||
|
|
|
|
- Math.abs(Y - this.startY) > minDragDis
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (Math.abs(X - this.startX) > minDragDis || Math.abs(Y - this.startY) > minDragDis) {
|
|
// 是否拖拽了
|
|
// 是否拖拽了
|
|
if (eventName != null) {
|
|
if (eventName != null) {
|
|
- if (
|
|
|
|
- eventName == LayerEvents.MoveMagnifier &&
|
|
|
|
- stateService.getSelectItem().state != 0
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (eventName == LayerEvents.MoveMagnifier && stateService.getSelectItem().state != 0) {
|
|
} else {
|
|
} else {
|
|
stateService.clearFocusItem();
|
|
stateService.clearFocusItem();
|
|
this.uiControl.clearFocusVector();
|
|
this.uiControl.clearFocusVector();
|
|
@@ -530,10 +462,8 @@ export default class Layer {
|
|
case LayerEvents.PanBackGround:
|
|
case LayerEvents.PanBackGround:
|
|
stateService.clearItems();
|
|
stateService.clearItems();
|
|
let center = {};
|
|
let center = {};
|
|
- center.x =
|
|
|
|
- coordinate.center.x - (dx * coordinate.defaultZoom) / coordinate.zoom;
|
|
|
|
- center.y =
|
|
|
|
- coordinate.center.y + (dy * coordinate.defaultZoom) / coordinate.zoom;
|
|
|
|
|
|
+ center.x = coordinate.center.x - (dx * coordinate.defaultZoom) / coordinate.zoom;
|
|
|
|
+ center.y = coordinate.center.y + (dy * coordinate.defaultZoom) / coordinate.zoom;
|
|
let tempCenter = {};
|
|
let tempCenter = {};
|
|
mathUtil.clonePoint(tempCenter, coordinate.center);
|
|
mathUtil.clonePoint(tempCenter, coordinate.center);
|
|
mathUtil.clonePoint(coordinate.center, center);
|
|
mathUtil.clonePoint(coordinate.center, center);
|
|
@@ -548,10 +478,7 @@ export default class Layer {
|
|
case LayerEvents.AddRoad:
|
|
case LayerEvents.AddRoad:
|
|
needAutoRedraw = true;
|
|
needAutoRedraw = true;
|
|
listenLayer.start(position);
|
|
listenLayer.start(position);
|
|
- if (
|
|
|
|
- listenLayer.modifyPoint &&
|
|
|
|
- listenLayer.modifyPoint.hasOwnProperty("x")
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (listenLayer.modifyPoint && listenLayer.modifyPoint.hasOwnProperty("x")) {
|
|
position = {
|
|
position = {
|
|
x: listenLayer.modifyPoint.x,
|
|
x: listenLayer.modifyPoint.x,
|
|
y: listenLayer.modifyPoint.y,
|
|
y: listenLayer.modifyPoint.y,
|
|
@@ -566,10 +493,7 @@ export default class Layer {
|
|
case LayerEvents.AddLine:
|
|
case LayerEvents.AddLine:
|
|
needAutoRedraw = true;
|
|
needAutoRedraw = true;
|
|
listenLayer.start(position);
|
|
listenLayer.start(position);
|
|
- if (
|
|
|
|
- listenLayer.modifyPoint &&
|
|
|
|
- listenLayer.modifyPoint.hasOwnProperty("x")
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (listenLayer.modifyPoint && listenLayer.modifyPoint.hasOwnProperty("x")) {
|
|
position = {
|
|
position = {
|
|
x: listenLayer.modifyPoint.x,
|
|
x: listenLayer.modifyPoint.x,
|
|
y: listenLayer.modifyPoint.y,
|
|
y: listenLayer.modifyPoint.y,
|
|
@@ -583,10 +507,7 @@ export default class Layer {
|
|
case LayerEvents.AddCurveLine:
|
|
case LayerEvents.AddCurveLine:
|
|
needAutoRedraw = true;
|
|
needAutoRedraw = true;
|
|
listenLayer.start(position);
|
|
listenLayer.start(position);
|
|
- if (
|
|
|
|
- listenLayer.modifyPoint &&
|
|
|
|
- listenLayer.modifyPoint.hasOwnProperty("x")
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (listenLayer.modifyPoint && listenLayer.modifyPoint.hasOwnProperty("x")) {
|
|
position = {
|
|
position = {
|
|
x: listenLayer.modifyPoint.x,
|
|
x: listenLayer.modifyPoint.x,
|
|
y: listenLayer.modifyPoint.y,
|
|
y: listenLayer.modifyPoint.y,
|
|
@@ -600,10 +521,7 @@ export default class Layer {
|
|
case LayerEvents.AddCircle:
|
|
case LayerEvents.AddCircle:
|
|
needAutoRedraw = true;
|
|
needAutoRedraw = true;
|
|
listenLayer.start(position);
|
|
listenLayer.start(position);
|
|
- if (
|
|
|
|
- listenLayer.modifyPoint &&
|
|
|
|
- listenLayer.modifyPoint.hasOwnProperty("x")
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (listenLayer.modifyPoint && listenLayer.modifyPoint.hasOwnProperty("x")) {
|
|
position = {
|
|
position = {
|
|
x: listenLayer.modifyPoint.x,
|
|
x: listenLayer.modifyPoint.x,
|
|
y: listenLayer.modifyPoint.y,
|
|
y: listenLayer.modifyPoint.y,
|
|
@@ -625,10 +543,7 @@ export default class Layer {
|
|
// addRoad.startInfo.linkedRoadPointId
|
|
// addRoad.startInfo.linkedRoadPointId
|
|
// });
|
|
// });
|
|
|
|
|
|
- if (
|
|
|
|
- listenLayer.modifyPoint &&
|
|
|
|
- listenLayer.modifyPoint.hasOwnProperty("x")
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (listenLayer.modifyPoint && listenLayer.modifyPoint.hasOwnProperty("x")) {
|
|
position = {
|
|
position = {
|
|
x: listenLayer.modifyPoint.x,
|
|
x: listenLayer.modifyPoint.x,
|
|
y: listenLayer.modifyPoint.y,
|
|
y: listenLayer.modifyPoint.y,
|
|
@@ -670,10 +585,7 @@ export default class Layer {
|
|
exceptLineIds: exceptLineId,
|
|
exceptLineIds: exceptLineId,
|
|
exceptPointId: exceptPointId,
|
|
exceptPointId: exceptPointId,
|
|
});
|
|
});
|
|
- if (
|
|
|
|
- listenLayer.modifyPoint &&
|
|
|
|
- listenLayer.modifyPoint.hasOwnProperty("x")
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (listenLayer.modifyPoint && listenLayer.modifyPoint.hasOwnProperty("x")) {
|
|
position = {
|
|
position = {
|
|
x: listenLayer.modifyPoint.x,
|
|
x: listenLayer.modifyPoint.x,
|
|
y: listenLayer.modifyPoint.y,
|
|
y: listenLayer.modifyPoint.y,
|
|
@@ -703,10 +615,7 @@ export default class Layer {
|
|
exceptCurveLineId: exceptCurveLineId,
|
|
exceptCurveLineId: exceptCurveLineId,
|
|
exceptCurvePointId: exceptCurvePointId,
|
|
exceptCurvePointId: exceptCurvePointId,
|
|
});
|
|
});
|
|
- if (
|
|
|
|
- listenLayer.modifyPoint &&
|
|
|
|
- listenLayer.modifyPoint.hasOwnProperty("x")
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (listenLayer.modifyPoint && listenLayer.modifyPoint.hasOwnProperty("x")) {
|
|
position = {
|
|
position = {
|
|
x: listenLayer.modifyPoint.x,
|
|
x: listenLayer.modifyPoint.x,
|
|
y: listenLayer.modifyPoint.y,
|
|
y: listenLayer.modifyPoint.y,
|
|
@@ -731,10 +640,7 @@ export default class Layer {
|
|
exceptCircleId = addCircle.newCircle.vectorId;
|
|
exceptCircleId = addCircle.newCircle.vectorId;
|
|
}
|
|
}
|
|
listenLayer.start(position, { exceptCircleId: exceptCircleId });
|
|
listenLayer.start(position, { exceptCircleId: exceptCircleId });
|
|
- if (
|
|
|
|
- listenLayer.modifyPoint &&
|
|
|
|
- listenLayer.modifyPoint.hasOwnProperty("x")
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (listenLayer.modifyPoint && listenLayer.modifyPoint.hasOwnProperty("x")) {
|
|
position = {
|
|
position = {
|
|
x: listenLayer.modifyPoint.x,
|
|
x: listenLayer.modifyPoint.x,
|
|
y: listenLayer.modifyPoint.y,
|
|
y: listenLayer.modifyPoint.y,
|
|
@@ -756,16 +662,9 @@ export default class Layer {
|
|
let road = dataService.getRoad(draggingItem.vectorId);
|
|
let road = dataService.getRoad(draggingItem.vectorId);
|
|
let start = dataService.getRoadPoint(road.startId);
|
|
let start = dataService.getRoadPoint(road.startId);
|
|
let end = dataService.getRoadPoint(road.endId);
|
|
let end = dataService.getRoadPoint(road.endId);
|
|
- if (
|
|
|
|
- Object.keys(start.getParent()).length == 1 &&
|
|
|
|
- Object.keys(end.getParent()).length == 1
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (Object.keys(start.getParent()).length == 1 && Object.keys(end.getParent()).length == 1) {
|
|
//拖拽的路只有一条
|
|
//拖拽的路只有一条
|
|
- moveRoad.moveRoad(
|
|
|
|
- draggingItem.vectorId,
|
|
|
|
- (dx * coordinate.defaultZoom) / coordinate.zoom,
|
|
|
|
- (dy * coordinate.defaultZoom) / coordinate.zoom
|
|
|
|
- );
|
|
|
|
|
|
+ moveRoad.moveRoad(draggingItem.vectorId, (dx * coordinate.defaultZoom) / coordinate.zoom, (dy * coordinate.defaultZoom) / coordinate.zoom);
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case LayerEvents.MoveRoadPoint:
|
|
case LayerEvents.MoveRoadPoint:
|
|
@@ -790,11 +689,7 @@ export default class Layer {
|
|
listenLayer.modifyPoint = null;
|
|
listenLayer.modifyPoint = null;
|
|
}
|
|
}
|
|
|
|
|
|
- let flag = moveRoad.moveingRoadPoint(
|
|
|
|
- draggingItem.vectorId,
|
|
|
|
- position,
|
|
|
|
- listenLayer.modifyPoint
|
|
|
|
- );
|
|
|
|
|
|
+ let flag = moveRoad.moveingRoadPoint(draggingItem.vectorId, position, listenLayer.modifyPoint);
|
|
if (!flag) {
|
|
if (!flag) {
|
|
elementService.hideAll();
|
|
elementService.hideAll();
|
|
} else {
|
|
} else {
|
|
@@ -805,10 +700,7 @@ export default class Layer {
|
|
case LayerEvents.AddCurveRoad:
|
|
case LayerEvents.AddCurveRoad:
|
|
needAutoRedraw = true;
|
|
needAutoRedraw = true;
|
|
listenLayer.start(position);
|
|
listenLayer.start(position);
|
|
- if (
|
|
|
|
- listenLayer.modifyPoint &&
|
|
|
|
- listenLayer.modifyPoint.hasOwnProperty("x")
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (listenLayer.modifyPoint && listenLayer.modifyPoint.hasOwnProperty("x")) {
|
|
position = {
|
|
position = {
|
|
x: listenLayer.modifyPoint.x,
|
|
x: listenLayer.modifyPoint.x,
|
|
y: listenLayer.modifyPoint.y,
|
|
y: listenLayer.modifyPoint.y,
|
|
@@ -822,10 +714,7 @@ export default class Layer {
|
|
case LayerEvents.AddingCurveRoad:
|
|
case LayerEvents.AddingCurveRoad:
|
|
needAutoRedraw = true;
|
|
needAutoRedraw = true;
|
|
listenLayer.start(position);
|
|
listenLayer.start(position);
|
|
- if (
|
|
|
|
- listenLayer.modifyPoint &&
|
|
|
|
- listenLayer.modifyPoint.hasOwnProperty("x")
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (listenLayer.modifyPoint && listenLayer.modifyPoint.hasOwnProperty("x")) {
|
|
position = {
|
|
position = {
|
|
x: listenLayer.modifyPoint.x,
|
|
x: listenLayer.modifyPoint.x,
|
|
y: listenLayer.modifyPoint.y,
|
|
y: listenLayer.modifyPoint.y,
|
|
@@ -848,11 +737,7 @@ export default class Layer {
|
|
break;
|
|
break;
|
|
case LayerEvents.MoveCurveRoad:
|
|
case LayerEvents.MoveCurveRoad:
|
|
needAutoRedraw = true;
|
|
needAutoRedraw = true;
|
|
- moveRoad.moveCurveRoad(
|
|
|
|
- draggingItem.vectorId,
|
|
|
|
- (dx * coordinate.defaultZoom) / coordinate.zoom,
|
|
|
|
- (dy * coordinate.defaultZoom) / coordinate.zoom
|
|
|
|
- );
|
|
|
|
|
|
+ moveRoad.moveCurveRoad(draggingItem.vectorId, (dx * coordinate.defaultZoom) / coordinate.zoom, (dy * coordinate.defaultZoom) / coordinate.zoom);
|
|
break;
|
|
break;
|
|
case LayerEvents.MoveCurveRoadPoint:
|
|
case LayerEvents.MoveCurveRoadPoint:
|
|
if (!draggingItem || !draggingItem.vectorId) {
|
|
if (!draggingItem || !draggingItem.vectorId) {
|
|
@@ -896,21 +781,13 @@ export default class Layer {
|
|
break;
|
|
break;
|
|
case LayerEvents.MoveCurveEdge:
|
|
case LayerEvents.MoveCurveEdge:
|
|
if (listenLayer.modifyPoint) {
|
|
if (listenLayer.modifyPoint) {
|
|
- moveRoad.moveCurveEdge(
|
|
|
|
- draggingItem.vectorId,
|
|
|
|
- listenLayer.modifyPoint.selectIndex,
|
|
|
|
- position
|
|
|
|
- );
|
|
|
|
|
|
+ moveRoad.moveCurveEdge(draggingItem.vectorId, listenLayer.modifyPoint.selectIndex, position);
|
|
}
|
|
}
|
|
needAutoRedraw = true;
|
|
needAutoRedraw = true;
|
|
break;
|
|
break;
|
|
case LayerEvents.MoveLine:
|
|
case LayerEvents.MoveLine:
|
|
if (draggingItem != null) {
|
|
if (draggingItem != null) {
|
|
- let flag = moveLine.moveLine(
|
|
|
|
- draggingItem.vectorId,
|
|
|
|
- (dx * coordinate.defaultZoom) / coordinate.zoom,
|
|
|
|
- (dy * coordinate.defaultZoom) / coordinate.zoom
|
|
|
|
- );
|
|
|
|
|
|
+ let flag = moveLine.moveLine(draggingItem.vectorId, (dx * coordinate.defaultZoom) / coordinate.zoom, (dy * coordinate.defaultZoom) / coordinate.zoom);
|
|
if (!flag) {
|
|
if (!flag) {
|
|
this.lastX = this.lastX - dx / coordinate.ratio;
|
|
this.lastX = this.lastX - dx / coordinate.ratio;
|
|
this.lastY = this.lastY - dy / coordinate.ratio;
|
|
this.lastY = this.lastY - dy / coordinate.ratio;
|
|
@@ -926,20 +803,13 @@ export default class Layer {
|
|
exceptLineIds: point.parent,
|
|
exceptLineIds: point.parent,
|
|
});
|
|
});
|
|
|
|
|
|
- if (
|
|
|
|
- listenLayer.modifyPoint &&
|
|
|
|
- listenLayer.modifyPoint.x &&
|
|
|
|
- listenLayer.modifyPoint.y
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (listenLayer.modifyPoint && listenLayer.modifyPoint.x && listenLayer.modifyPoint.y) {
|
|
position = {
|
|
position = {
|
|
x: listenLayer.modifyPoint.x,
|
|
x: listenLayer.modifyPoint.x,
|
|
y: listenLayer.modifyPoint.y,
|
|
y: listenLayer.modifyPoint.y,
|
|
};
|
|
};
|
|
}
|
|
}
|
|
- let movePointFlag = movePoint.movePoint(
|
|
|
|
- position,
|
|
|
|
- draggingItem.vectorId
|
|
|
|
- );
|
|
|
|
|
|
+ let movePointFlag = movePoint.movePoint(position, draggingItem.vectorId);
|
|
needAutoRedraw = true;
|
|
needAutoRedraw = true;
|
|
if (!point) {
|
|
if (!point) {
|
|
stateService.clearEventName();
|
|
stateService.clearEventName();
|
|
@@ -955,10 +825,7 @@ export default class Layer {
|
|
exceptCurvePointId: draggingItem.vectorId,
|
|
exceptCurvePointId: draggingItem.vectorId,
|
|
exceptCurveLineId: curvePoint.parent,
|
|
exceptCurveLineId: curvePoint.parent,
|
|
});
|
|
});
|
|
- if (
|
|
|
|
- listenLayer.modifyPoint &&
|
|
|
|
- listenLayer.modifyPoint.hasOwnProperty("x")
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (listenLayer.modifyPoint && listenLayer.modifyPoint.hasOwnProperty("x")) {
|
|
position = {
|
|
position = {
|
|
x: listenLayer.modifyPoint.x,
|
|
x: listenLayer.modifyPoint.x,
|
|
y: listenLayer.modifyPoint.y,
|
|
y: listenLayer.modifyPoint.y,
|
|
@@ -973,33 +840,16 @@ export default class Layer {
|
|
break;
|
|
break;
|
|
case LayerEvents.MoveCurveLine:
|
|
case LayerEvents.MoveCurveLine:
|
|
if (draggingItem != null) {
|
|
if (draggingItem != null) {
|
|
- moveLine.moveCurveLine(
|
|
|
|
- draggingItem.vectorId,
|
|
|
|
- (dx * coordinate.defaultZoom) / coordinate.zoom,
|
|
|
|
- (dy * coordinate.defaultZoom) / coordinate.zoom
|
|
|
|
- );
|
|
|
|
|
|
+ moveLine.moveCurveLine(draggingItem.vectorId, (dx * coordinate.defaultZoom) / coordinate.zoom, (dy * coordinate.defaultZoom) / coordinate.zoom);
|
|
needAutoRedraw = true;
|
|
needAutoRedraw = true;
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case LayerEvents.MoveCircle:
|
|
case LayerEvents.MoveCircle:
|
|
if (draggingItem != null) {
|
|
if (draggingItem != null) {
|
|
if (draggingItem.state == -1) {
|
|
if (draggingItem.state == -1) {
|
|
- moveCircle.moveFull(
|
|
|
|
- draggingItem.vectorId,
|
|
|
|
- (dx * coordinate.defaultZoom) / coordinate.zoom,
|
|
|
|
- (dy * coordinate.defaultZoom) / coordinate.zoom
|
|
|
|
- );
|
|
|
|
- } else if (
|
|
|
|
- draggingItem.state == 0 ||
|
|
|
|
- draggingItem.state == 1 ||
|
|
|
|
- draggingItem.state == 2 ||
|
|
|
|
- draggingItem.state == 3
|
|
|
|
- ) {
|
|
|
|
- moveCircle.movePoint(
|
|
|
|
- position,
|
|
|
|
- draggingItem.vectorId,
|
|
|
|
- draggingItem.state
|
|
|
|
- );
|
|
|
|
|
|
+ moveCircle.moveFull(draggingItem.vectorId, (dx * coordinate.defaultZoom) / coordinate.zoom, (dy * coordinate.defaultZoom) / coordinate.zoom);
|
|
|
|
+ } else if (draggingItem.state == 0 || draggingItem.state == 1 || draggingItem.state == 2 || draggingItem.state == 3) {
|
|
|
|
+ moveCircle.movePoint(position, draggingItem.vectorId, draggingItem.state);
|
|
} else {
|
|
} else {
|
|
debugger;
|
|
debugger;
|
|
}
|
|
}
|
|
@@ -1023,22 +873,14 @@ export default class Layer {
|
|
if (draggingItem.state == -1) {
|
|
if (draggingItem.state == -1) {
|
|
moveSVG.moveFullSVG(position, draggingItem.vectorId);
|
|
moveSVG.moveFullSVG(position, draggingItem.vectorId);
|
|
} else {
|
|
} else {
|
|
- moveSVG.movePoint(
|
|
|
|
- position,
|
|
|
|
- draggingItem.vectorId,
|
|
|
|
- draggingItem.state
|
|
|
|
- );
|
|
|
|
|
|
+ moveSVG.movePoint(position, draggingItem.vectorId, draggingItem.state);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case LayerEvents.MoveMagnifier:
|
|
case LayerEvents.MoveMagnifier:
|
|
needAutoRedraw = true;
|
|
needAutoRedraw = true;
|
|
if (draggingItem != null) {
|
|
if (draggingItem != null) {
|
|
- moveMagnifier.moveFullMagnifier(
|
|
|
|
- position,
|
|
|
|
- draggingItem.vectorId,
|
|
|
|
- draggingItem.state
|
|
|
|
- );
|
|
|
|
|
|
+ moveMagnifier.moveFullMagnifier(position, draggingItem.vectorId, draggingItem.state);
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
@@ -1133,6 +975,13 @@ export default class Layer {
|
|
addRoad.buildRoad();
|
|
addRoad.buildRoad();
|
|
elementService.hideAll();
|
|
elementService.hideAll();
|
|
}
|
|
}
|
|
|
|
+ let roadEdges = dataService.getRoadEdges();
|
|
|
|
+ for (let roadEdgeId in roadEdges) {
|
|
|
|
+ let roadEdge = dataService.getRoadEdge(roadEdgeId);
|
|
|
|
+ if (roadEdge.roadSide) {
|
|
|
|
+ roadEdge.initRoadSide();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
this.uiControl.confirmEntry(); //不能连续创建道路
|
|
this.uiControl.confirmEntry(); //不能连续创建道路
|
|
break;
|
|
break;
|
|
case LayerEvents.AddingLine:
|
|
case LayerEvents.AddingLine:
|
|
@@ -1140,10 +989,7 @@ export default class Layer {
|
|
addLine.finish(position);
|
|
addLine.finish(position);
|
|
this.updateForLocation();
|
|
this.updateForLocation();
|
|
//绘制的是基准线
|
|
//绘制的是基准线
|
|
- if (
|
|
|
|
- addLine.newLine &&
|
|
|
|
- Settings.baseLineId == addLine.newLine.vectorId
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (addLine.newLine && Settings.baseLineId == addLine.newLine.vectorId) {
|
|
stateService.clearEventName();
|
|
stateService.clearEventName();
|
|
this.history.save();
|
|
this.history.save();
|
|
}
|
|
}
|
|
@@ -1205,24 +1051,11 @@ export default class Layer {
|
|
break;
|
|
break;
|
|
case LayerEvents.MoveCurveRoadPoint:
|
|
case LayerEvents.MoveCurveRoadPoint:
|
|
needAutoRedraw = true;
|
|
needAutoRedraw = true;
|
|
- if (
|
|
|
|
- listenLayer.modifyPoint &&
|
|
|
|
- listenLayer.modifyPoint.linkedCurveRoadPointId
|
|
|
|
- ) {
|
|
|
|
- let curveRoadPoint1 = dataService.getCurveRoadPoint(
|
|
|
|
- listenLayer.modifyPoint.linkedCurveRoadPointId
|
|
|
|
- );
|
|
|
|
- let curveRoadPoint2 = dataService.getCurveRoadPoint(
|
|
|
|
- draggingItem.vectorId
|
|
|
|
- );
|
|
|
|
- if (
|
|
|
|
- listenLayer.modifyPoint.linkedCurveRoadPointId !=
|
|
|
|
- draggingItem.vectorId &&
|
|
|
|
- curveRoadPoint1.getParent() == curveRoadPoint2.getParent()
|
|
|
|
- ) {
|
|
|
|
- curveRoadPointService.deleteCurveRoadPoint(
|
|
|
|
- listenLayer.modifyPoint.linkedCurveRoadPointId
|
|
|
|
- );
|
|
|
|
|
|
+ if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedCurveRoadPointId) {
|
|
|
|
+ let curveRoadPoint1 = dataService.getCurveRoadPoint(listenLayer.modifyPoint.linkedCurveRoadPointId);
|
|
|
|
+ let curveRoadPoint2 = dataService.getCurveRoadPoint(draggingItem.vectorId);
|
|
|
|
+ if (listenLayer.modifyPoint.linkedCurveRoadPointId != draggingItem.vectorId && curveRoadPoint1.getParent() == curveRoadPoint2.getParent()) {
|
|
|
|
+ curveRoadPointService.deleteCurveRoadPoint(listenLayer.modifyPoint.linkedCurveRoadPointId);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
this.history.save();
|
|
this.history.save();
|
|
@@ -1254,23 +1087,11 @@ export default class Layer {
|
|
break;
|
|
break;
|
|
case LayerEvents.MoveCurvePoint:
|
|
case LayerEvents.MoveCurvePoint:
|
|
needAutoRedraw = true;
|
|
needAutoRedraw = true;
|
|
- if (
|
|
|
|
- listenLayer.modifyPoint &&
|
|
|
|
- listenLayer.modifyPoint.linkedCurvePointId
|
|
|
|
- ) {
|
|
|
|
- let curvePoint1 = dataService.getCurvePoint(
|
|
|
|
- listenLayer.modifyPoint.linkedCurvePointId
|
|
|
|
- );
|
|
|
|
|
|
+ if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedCurvePointId) {
|
|
|
|
+ let curvePoint1 = dataService.getCurvePoint(listenLayer.modifyPoint.linkedCurvePointId);
|
|
let curvePoint2 = dataService.getCurvePoint(draggingItem.vectorId);
|
|
let curvePoint2 = dataService.getCurvePoint(draggingItem.vectorId);
|
|
- if (
|
|
|
|
- listenLayer.modifyPoint.linkedCurvePointId !=
|
|
|
|
- draggingItem.vectorId &&
|
|
|
|
- curvePoint1.getParent() == curvePoint2.getParent()
|
|
|
|
- ) {
|
|
|
|
- lineService.deleteCrossPointForCurveLine(
|
|
|
|
- listenLayer.modifyPoint.linkedCurvePointId,
|
|
|
|
- curvePoint1.getParent()
|
|
|
|
- );
|
|
|
|
|
|
+ if (listenLayer.modifyPoint.linkedCurvePointId != draggingItem.vectorId && curvePoint1.getParent() == curvePoint2.getParent()) {
|
|
|
|
+ lineService.deleteCrossPointForCurveLine(listenLayer.modifyPoint.linkedCurvePointId, curvePoint1.getParent());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
elementService.hideAll();
|
|
elementService.hideAll();
|
|
@@ -1315,9 +1136,7 @@ export default class Layer {
|
|
const type = e.type;
|
|
const type = e.type;
|
|
if (type == "DOMMouseScroll" || type == "mousewheel") {
|
|
if (type == "DOMMouseScroll" || type == "mousewheel") {
|
|
// 当在canvas用滚轮滚动时
|
|
// 当在canvas用滚轮滚动时
|
|
- const delta = e.wheelDelta
|
|
|
|
- ? (e.wheelDelta / 120) * 20
|
|
|
|
- : (-(e.detail || 0) / 3) * 20;
|
|
|
|
|
|
+ const delta = e.wheelDelta ? (e.wheelDelta / 120) * 20 : (-(e.detail || 0) / 3) * 20;
|
|
const zoom = coordinate.zoom + delta;
|
|
const zoom = coordinate.zoom + delta;
|
|
let X = e.offsetX || e.layerX;
|
|
let X = e.offsetX || e.layerX;
|
|
let Y = e.offsetY || e.layerY;
|
|
let Y = e.offsetY || e.layerY;
|
|
@@ -1421,10 +1240,7 @@ export default class Layer {
|
|
|
|
|
|
stopAddVector() {
|
|
stopAddVector() {
|
|
let eventName = stateService.getEventName();
|
|
let eventName = stateService.getEventName();
|
|
- if (
|
|
|
|
- eventName != LayerEvents.AddingRoad &&
|
|
|
|
- eventName != LayerEvents.AddingLine
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (eventName != LayerEvents.AddingRoad && eventName != LayerEvents.AddingLine) {
|
|
stateService.clearEventName();
|
|
stateService.clearEventName();
|
|
} else if (eventName == LayerEvents.AddingRoad) {
|
|
} else if (eventName == LayerEvents.AddingRoad) {
|
|
stateService.setEventName(LayerEvents.AddRoad);
|
|
stateService.setEventName(LayerEvents.AddRoad);
|
|
@@ -1562,57 +1378,23 @@ export default class Layer {
|
|
let otherPoint1 = null;
|
|
let otherPoint1 = null;
|
|
let otherPoint2 = null;
|
|
let otherPoint2 = null;
|
|
if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedRoadPointIdX) {
|
|
if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedRoadPointIdX) {
|
|
- otherPoint1 = dataService.getRoadPoint(
|
|
|
|
- listenLayer.modifyPoint.linkedRoadPointIdX
|
|
|
|
- );
|
|
|
|
- } else if (
|
|
|
|
- listenLayer.modifyPoint &&
|
|
|
|
- listenLayer.modifyPoint.linkedCurveRoadPointIdX
|
|
|
|
- ) {
|
|
|
|
- otherPoint1 = dataService.getCurveRoadPoint(
|
|
|
|
- listenLayer.modifyPoint.linkedCurvePointIdX
|
|
|
|
- );
|
|
|
|
- } else if (
|
|
|
|
- listenLayer.modifyPoint &&
|
|
|
|
- listenLayer.modifyPoint.linkedPointIdX
|
|
|
|
- ) {
|
|
|
|
- otherPoint1 = dataService.getPoint(
|
|
|
|
- listenLayer.modifyPoint.linkedPointIdX
|
|
|
|
- );
|
|
|
|
- } else if (
|
|
|
|
- listenLayer.modifyPoint &&
|
|
|
|
- listenLayer.modifyPoint.linkedCurvePointIdX
|
|
|
|
- ) {
|
|
|
|
- otherPoint1 = dataService.getCurvePoint(
|
|
|
|
- listenLayer.modifyPoint.linkedCurvePointIdX
|
|
|
|
- );
|
|
|
|
|
|
+ otherPoint1 = dataService.getRoadPoint(listenLayer.modifyPoint.linkedRoadPointIdX);
|
|
|
|
+ } else if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedCurveRoadPointIdX) {
|
|
|
|
+ otherPoint1 = dataService.getCurveRoadPoint(listenLayer.modifyPoint.linkedCurvePointIdX);
|
|
|
|
+ } else if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedPointIdX) {
|
|
|
|
+ otherPoint1 = dataService.getPoint(listenLayer.modifyPoint.linkedPointIdX);
|
|
|
|
+ } else if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedCurvePointIdX) {
|
|
|
|
+ otherPoint1 = dataService.getCurvePoint(listenLayer.modifyPoint.linkedCurvePointIdX);
|
|
}
|
|
}
|
|
|
|
|
|
if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedRoadPointIdY) {
|
|
if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedRoadPointIdY) {
|
|
- otherPoint2 = dataService.getRoadPoint(
|
|
|
|
- listenLayer.modifyPoint.linkedRoadPointIdY
|
|
|
|
- );
|
|
|
|
- } else if (
|
|
|
|
- listenLayer.modifyPoint &&
|
|
|
|
- listenLayer.modifyPoint.linkedCurvePointIdY
|
|
|
|
- ) {
|
|
|
|
- otherPoint2 = dataService.getCurveRoadPoint(
|
|
|
|
- listenLayer.modifyPoint.linkedCurvePointIdY
|
|
|
|
- );
|
|
|
|
- } else if (
|
|
|
|
- listenLayer.modifyPoint &&
|
|
|
|
- listenLayer.modifyPoint.linkedPointIdY
|
|
|
|
- ) {
|
|
|
|
- otherPoint2 = dataService.getPoint(
|
|
|
|
- listenLayer.modifyPoint.linkedPointIdY
|
|
|
|
- );
|
|
|
|
- } else if (
|
|
|
|
- listenLayer.modifyPoint &&
|
|
|
|
- listenLayer.modifyPoint.linkedCurvePointIdY
|
|
|
|
- ) {
|
|
|
|
- otherPoint2 = dataService.getCurvePoint(
|
|
|
|
- listenLayer.modifyPoint.linkedCurvePointIdY
|
|
|
|
- );
|
|
|
|
|
|
+ otherPoint2 = dataService.getRoadPoint(listenLayer.modifyPoint.linkedRoadPointIdY);
|
|
|
|
+ } else if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedCurvePointIdY) {
|
|
|
|
+ otherPoint2 = dataService.getCurveRoadPoint(listenLayer.modifyPoint.linkedCurvePointIdY);
|
|
|
|
+ } else if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedPointIdY) {
|
|
|
|
+ otherPoint2 = dataService.getPoint(listenLayer.modifyPoint.linkedPointIdY);
|
|
|
|
+ } else if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedCurvePointIdY) {
|
|
|
|
+ otherPoint2 = dataService.getCurvePoint(listenLayer.modifyPoint.linkedCurvePointIdY);
|
|
}
|
|
}
|
|
|
|
|
|
let otherPoint = {};
|
|
let otherPoint = {};
|