|
@@ -32,7 +32,7 @@ export default class HistoryUtil {
|
|
line1.linkedFixPointId == line2.linkedFixPointId &&
|
|
line1.linkedFixPointId == line2.linkedFixPointId &&
|
|
line1.linkedBasePointId == line2.linkedBasePointId &&
|
|
line1.linkedBasePointId == line2.linkedBasePointId &&
|
|
line1.style == line2.style &&
|
|
line1.style == line2.style &&
|
|
- line1.weight == line2.weight &&
|
|
|
|
|
|
+ line1.weight == line2.weight &&
|
|
line1.zebraCrossStyle == line2.zebraCrossStyle
|
|
line1.zebraCrossStyle == line2.zebraCrossStyle
|
|
) {
|
|
) {
|
|
return false;
|
|
return false;
|
|
@@ -42,12 +42,7 @@ export default class HistoryUtil {
|
|
}
|
|
}
|
|
|
|
|
|
isDifferentForCurvePoints(curvePoint1, curvePoint2) {
|
|
isDifferentForCurvePoints(curvePoint1, curvePoint2) {
|
|
- if (
|
|
|
|
- curvePoint1.x == curvePoint2.x &&
|
|
|
|
- curvePoint1.y == curvePoint2.y &&
|
|
|
|
- curvePoint1.parent == curvePoint2.parent &&
|
|
|
|
- curvePoint1.index == curvePoint2.index
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (curvePoint1.x == curvePoint2.x && curvePoint1.y == curvePoint2.y && curvePoint1.parent == curvePoint2.parent && curvePoint1.index == curvePoint2.index) {
|
|
return false;
|
|
return false;
|
|
} else {
|
|
} else {
|
|
return true;
|
|
return true;
|
|
@@ -55,11 +50,7 @@ export default class HistoryUtil {
|
|
}
|
|
}
|
|
|
|
|
|
isDifferentForCurveLines(curveLine1, curveLine2) {
|
|
isDifferentForCurveLines(curveLine1, curveLine2) {
|
|
- if (
|
|
|
|
- curveLine1.startId == curveLine2.startId &&
|
|
|
|
- curveLine1.endId == curveLine2.endId &&
|
|
|
|
- mathUtil.equalJSON(curveLine1.points, curveLine2.points)
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (curveLine1.startId == curveLine2.startId && curveLine1.endId == curveLine2.endId && mathUtil.equalJSON(curveLine1.points, curveLine2.points)) {
|
|
return false;
|
|
return false;
|
|
} else {
|
|
} else {
|
|
return true;
|
|
return true;
|
|
@@ -67,12 +58,7 @@ export default class HistoryUtil {
|
|
}
|
|
}
|
|
|
|
|
|
isDifferentForCircles(circle1, circle2) {
|
|
isDifferentForCircles(circle1, circle2) {
|
|
- if (
|
|
|
|
- mathUtil.equalPoint(circle1.center, circle2.center) &&
|
|
|
|
- circle1.radiusX == circle2.radiusX &&
|
|
|
|
- circle1.radiusY == circle2.radiusY &&
|
|
|
|
- circle1.color == circle2.color
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (mathUtil.equalPoint(circle1.center, circle2.center) && circle1.radiusX == circle2.radiusX && circle1.radiusY == circle2.radiusY && circle1.color == circle2.color) {
|
|
return false;
|
|
return false;
|
|
} else {
|
|
} else {
|
|
return true;
|
|
return true;
|
|
@@ -95,11 +81,7 @@ export default class HistoryUtil {
|
|
}
|
|
}
|
|
|
|
|
|
isDifferentForMagnifiers(magnifier1, magnifier2) {
|
|
isDifferentForMagnifiers(magnifier1, magnifier2) {
|
|
- if (
|
|
|
|
- mathUtil.equalPoint(magnifier1.position, magnifier2.position) &&
|
|
|
|
- magnifier1.photoUrl == magnifier2.photoUrl &&
|
|
|
|
- mathUtil.equalPoint(magnifier1.popPosition, magnifier2.popPosition)
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (mathUtil.equalPoint(magnifier1.position, magnifier2.position) && magnifier1.photoUrl == magnifier2.photoUrl && mathUtil.equalPoint(magnifier1.popPosition, magnifier2.popPosition)) {
|
|
return false;
|
|
return false;
|
|
} else {
|
|
} else {
|
|
return true;
|
|
return true;
|
|
@@ -107,12 +89,7 @@ export default class HistoryUtil {
|
|
}
|
|
}
|
|
|
|
|
|
isDifferentForSVGs(svg1, svg2) {
|
|
isDifferentForSVGs(svg1, svg2) {
|
|
- if (
|
|
|
|
- mathUtil.equalPoint(svg1.center, svg2.center) &&
|
|
|
|
- svg1.type == svg2.type &&
|
|
|
|
- svg1.angle == svg2.angle &&
|
|
|
|
- svg1.scale == svg2.scale
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (mathUtil.equalPoint(svg1.center, svg2.center) && svg1.type == svg2.type && svg1.angle == svg2.angle && svg1.scale == svg2.scale) {
|
|
return false;
|
|
return false;
|
|
} else {
|
|
} else {
|
|
return true;
|
|
return true;
|
|
@@ -120,10 +97,7 @@ export default class HistoryUtil {
|
|
}
|
|
}
|
|
|
|
|
|
isDifferentForRoadPoints(roadPoint1, roadPoint2) {
|
|
isDifferentForRoadPoints(roadPoint1, roadPoint2) {
|
|
- if (
|
|
|
|
- mathUtil.equalPoint(roadPoint1, roadPoint2) &&
|
|
|
|
- mathUtil.equalJSON(roadPoint1.parent, roadPoint2.parent)
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (mathUtil.equalPoint(roadPoint1, roadPoint2) && mathUtil.equalJSON(roadPoint1.parent, roadPoint2.parent)) {
|
|
return false;
|
|
return false;
|
|
} else {
|
|
} else {
|
|
return true;
|
|
return true;
|
|
@@ -136,7 +110,8 @@ export default class HistoryUtil {
|
|
mathUtil.equalPoint(roadEdge1.end, roadEdge2.end) &&
|
|
mathUtil.equalPoint(roadEdge1.end, roadEdge2.end) &&
|
|
roadEdge1.parent == roadEdge2.parent &&
|
|
roadEdge1.parent == roadEdge2.parent &&
|
|
roadEdge1.style == roadEdge2.style &&
|
|
roadEdge1.style == roadEdge2.style &&
|
|
- roadEdge1.roadSide == roadEdge2.roadSide
|
|
|
|
|
|
+ roadEdge1.weight == roadEdge2.weight &&
|
|
|
|
+ roadEdge1.roadSide == roadEdge2.roadSide
|
|
) {
|
|
) {
|
|
return false;
|
|
return false;
|
|
} else {
|
|
} else {
|
|
@@ -151,25 +126,12 @@ export default class HistoryUtil {
|
|
road1.leftEdgeId == road2.leftEdgeId &&
|
|
road1.leftEdgeId == road2.leftEdgeId &&
|
|
road1.rightEdgeId == road2.rightEdgeId &&
|
|
road1.rightEdgeId == road2.rightEdgeId &&
|
|
road1.way == road2.way &&
|
|
road1.way == road2.way &&
|
|
- road1.roadWidthTipsPos == road2.roadWidthTipsPos
|
|
|
|
|
|
+ road1.roadWidthTipsPos == road2.roadWidthTipsPos
|
|
) {
|
|
) {
|
|
if (road1.way == Constant.oneWay) {
|
|
if (road1.way == Constant.oneWay) {
|
|
- if (
|
|
|
|
- road1.singleRoadWidth == road2.singleRoadWidth &&
|
|
|
|
- road1.singleRoadDrivewayCount == road2.singleRoadDrivewayCount &&
|
|
|
|
- road1.singleLanes.length == road2.singleLanes.length
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (road1.singleRoadWidth == road2.singleRoadWidth && road1.singleRoadDrivewayCount == road2.singleRoadDrivewayCount && road1.singleLanes.length == road2.singleLanes.length) {
|
|
for (let i = 0; i < road1.singleLanes.length; ++i) {
|
|
for (let i = 0; i < road1.singleLanes.length; ++i) {
|
|
- if (
|
|
|
|
- !mathUtil.equalPoint(
|
|
|
|
- road1.singleLanes[i].start,
|
|
|
|
- road2.singleLanes[i].start
|
|
|
|
- ) ||
|
|
|
|
- !mathUtil.equalPoint(
|
|
|
|
- road1.singleLanes[i].end,
|
|
|
|
- road2.singleLanes[i].end
|
|
|
|
- )
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (!mathUtil.equalPoint(road1.singleLanes[i].start, road2.singleLanes[i].start) || !mathUtil.equalPoint(road1.singleLanes[i].end, road2.singleLanes[i].end)) {
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -184,50 +146,20 @@ export default class HistoryUtil {
|
|
road1.leftDrivewayCount == road2.leftDrivewayCount &&
|
|
road1.leftDrivewayCount == road2.leftDrivewayCount &&
|
|
road1.rightDrivewayCount == road2.rightDrivewayCount &&
|
|
road1.rightDrivewayCount == road2.rightDrivewayCount &&
|
|
road1.midDivide.midDivideWidth == road2.midDivide.midDivideWidth &&
|
|
road1.midDivide.midDivideWidth == road2.midDivide.midDivideWidth &&
|
|
- mathUtil.equalPoint(
|
|
|
|
- road1.midDivide.leftMidDivide.start,
|
|
|
|
- road2.midDivide.leftMidDivide.start
|
|
|
|
- ) &&
|
|
|
|
- mathUtil.equalPoint(
|
|
|
|
- road1.midDivide.leftMidDivide.end,
|
|
|
|
- road2.midDivide.leftMidDivide.end
|
|
|
|
- ) &&
|
|
|
|
- mathUtil.equalPoint(
|
|
|
|
- road1.midDivide.rightMidDivide.start,
|
|
|
|
- road2.midDivide.rightMidDivide.start
|
|
|
|
- ) &&
|
|
|
|
- mathUtil.equalPoint(
|
|
|
|
- road1.midDivide.rightMidDivide.end,
|
|
|
|
- road2.midDivide.rightMidDivide.end
|
|
|
|
- ) &&
|
|
|
|
|
|
+ mathUtil.equalPoint(road1.midDivide.leftMidDivide.start, road2.midDivide.leftMidDivide.start) &&
|
|
|
|
+ mathUtil.equalPoint(road1.midDivide.leftMidDivide.end, road2.midDivide.leftMidDivide.end) &&
|
|
|
|
+ mathUtil.equalPoint(road1.midDivide.rightMidDivide.start, road2.midDivide.rightMidDivide.start) &&
|
|
|
|
+ mathUtil.equalPoint(road1.midDivide.rightMidDivide.end, road2.midDivide.rightMidDivide.end) &&
|
|
road1.leftLanes.length == road2.leftLanes.length &&
|
|
road1.leftLanes.length == road2.leftLanes.length &&
|
|
road1.rightLanes.length == road2.rightLanes.length
|
|
road1.rightLanes.length == road2.rightLanes.length
|
|
) {
|
|
) {
|
|
for (let i = 0; i < road1.leftLanes.length; ++i) {
|
|
for (let i = 0; i < road1.leftLanes.length; ++i) {
|
|
- if (
|
|
|
|
- !mathUtil.equalPoint(
|
|
|
|
- road1.leftLanes[i].start,
|
|
|
|
- road2.leftLanes[i].start
|
|
|
|
- ) ||
|
|
|
|
- !mathUtil.equalPoint(
|
|
|
|
- road1.leftLanes[i].end,
|
|
|
|
- road2.leftLanes[i].end
|
|
|
|
- )
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (!mathUtil.equalPoint(road1.leftLanes[i].start, road2.leftLanes[i].start) || !mathUtil.equalPoint(road1.leftLanes[i].end, road2.leftLanes[i].end)) {
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
for (let i = 0; i < road1.rightLanes.length; ++i) {
|
|
for (let i = 0; i < road1.rightLanes.length; ++i) {
|
|
- if (
|
|
|
|
- !mathUtil.equalPoint(
|
|
|
|
- road1.rightLanes[i].start,
|
|
|
|
- road2.rightLanes[i].start
|
|
|
|
- ) ||
|
|
|
|
- !mathUtil.equalPoint(
|
|
|
|
- road1.rightLanes[i].end,
|
|
|
|
- road2.rightLanes[i].end
|
|
|
|
- )
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (!mathUtil.equalPoint(road1.rightLanes[i].start, road2.rightLanes[i].start) || !mathUtil.equalPoint(road1.rightLanes[i].end, road2.rightLanes[i].end)) {
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -244,11 +176,7 @@ export default class HistoryUtil {
|
|
}
|
|
}
|
|
|
|
|
|
isDifferentForCurveRoadPoints(curveRoadPoint1, curveRoadPoint2) {
|
|
isDifferentForCurveRoadPoints(curveRoadPoint1, curveRoadPoint2) {
|
|
- if (
|
|
|
|
- mathUtil.equalPoint(curveRoadPoint1, curveRoadPoint2) &&
|
|
|
|
- mathUtil.equalJSON(curveRoadPoint1.parent, curveRoadPoint2.parent) &&
|
|
|
|
- curveRoadPoint1.index == curveRoadPoint2.index
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (mathUtil.equalPoint(curveRoadPoint1, curveRoadPoint2) && mathUtil.equalJSON(curveRoadPoint1.parent, curveRoadPoint2.parent) && curveRoadPoint1.index == curveRoadPoint2.index) {
|
|
return false;
|
|
return false;
|
|
} else {
|
|
} else {
|
|
return true;
|
|
return true;
|
|
@@ -262,8 +190,9 @@ export default class HistoryUtil {
|
|
mathUtil.equalPoints(curveRoadEdge1.points, curveRoadEdge2.points) &&
|
|
mathUtil.equalPoints(curveRoadEdge1.points, curveRoadEdge2.points) &&
|
|
curveRoadEdge1.parent == curveRoadEdge2.parent &&
|
|
curveRoadEdge1.parent == curveRoadEdge2.parent &&
|
|
curveRoadEdge1.style == curveRoadEdge2.style &&
|
|
curveRoadEdge1.style == curveRoadEdge2.style &&
|
|
- curveRoadEdge1.weight == curveRoadEdge2.weight &&
|
|
|
|
- curveRoadEdge1.roadSide == curveRoadEdge2.roadSide
|
|
|
|
|
|
+ curveRoadEdge1.weight == curveRoadEdge2.weight
|
|
|
|
+ // &&
|
|
|
|
+ // curveRoadEdge1.roadSide == curveRoadEdge2.roadSide
|
|
) {
|
|
) {
|
|
return false;
|
|
return false;
|
|
} else {
|
|
} else {
|
|
@@ -281,11 +210,7 @@ export default class HistoryUtil {
|
|
curveRoad1.way == curveRoad2.way
|
|
curveRoad1.way == curveRoad2.way
|
|
) {
|
|
) {
|
|
if (curveRoad1.way == Constant.oneWay) {
|
|
if (curveRoad1.way == Constant.oneWay) {
|
|
- if (
|
|
|
|
- curveRoad1.singleRoadWidth == curveRoad2.singleRoadWidth &&
|
|
|
|
- curveRoad1.singleRoadDrivewayCount ==
|
|
|
|
- curveRoad2.singleRoadDrivewayCount
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (curveRoad1.singleRoadWidth == curveRoad2.singleRoadWidth && curveRoad1.singleRoadDrivewayCount == curveRoad2.singleRoadDrivewayCount) {
|
|
return false;
|
|
return false;
|
|
} else {
|
|
} else {
|
|
return true;
|
|
return true;
|
|
@@ -296,8 +221,7 @@ export default class HistoryUtil {
|
|
curveRoad1.rightWidth == curveRoad2.rightWidth &&
|
|
curveRoad1.rightWidth == curveRoad2.rightWidth &&
|
|
curveRoad1.leftDrivewayCount == curveRoad2.leftDrivewayCount &&
|
|
curveRoad1.leftDrivewayCount == curveRoad2.leftDrivewayCount &&
|
|
curveRoad1.rightDrivewayCount == curveRoad2.rightDrivewayCount &&
|
|
curveRoad1.rightDrivewayCount == curveRoad2.rightDrivewayCount &&
|
|
- curveRoad1.midDivide.midDivideWidth ==
|
|
|
|
- curveRoad2.midDivide.midDivideWidth
|
|
|
|
|
|
+ curveRoad1.midDivide.midDivideWidth == curveRoad2.midDivide.midDivideWidth
|
|
) {
|
|
) {
|
|
return false;
|
|
return false;
|
|
} else {
|
|
} else {
|
|
@@ -366,7 +290,7 @@ export default class HistoryUtil {
|
|
lineInfo.value = line2.value;
|
|
lineInfo.value = line2.value;
|
|
lineInfo.style = line2.style;
|
|
lineInfo.style = line2.style;
|
|
lineInfo.weight = line2.weight;
|
|
lineInfo.weight = line2.weight;
|
|
- lineInfo.zebraCrossStyle = line2.zebraCrossStyle
|
|
|
|
|
|
+ lineInfo.zebraCrossStyle = line2.zebraCrossStyle;
|
|
this.setLineInfo(lineInfo);
|
|
this.setLineInfo(lineInfo);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -417,9 +341,7 @@ export default class HistoryUtil {
|
|
magnifierInfo.vectorId = magnifier1.vectorId;
|
|
magnifierInfo.vectorId = magnifier1.vectorId;
|
|
magnifierInfo.photoUrl = magnifier2.photoUrl;
|
|
magnifierInfo.photoUrl = magnifier2.photoUrl;
|
|
magnifierInfo.position = JSON.parse(JSON.stringify(magnifier2.position));
|
|
magnifierInfo.position = JSON.parse(JSON.stringify(magnifier2.position));
|
|
- magnifierInfo.popPosition = JSON.parse(
|
|
|
|
- JSON.stringify(magnifier2.popPosition)
|
|
|
|
- );
|
|
|
|
|
|
+ magnifierInfo.popPosition = JSON.parse(JSON.stringify(magnifier2.popPosition));
|
|
this.setMagnifierInfo(magnifierInfo);
|
|
this.setMagnifierInfo(magnifierInfo);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -449,6 +371,7 @@ export default class HistoryUtil {
|
|
const roadEdgeInfo = {};
|
|
const roadEdgeInfo = {};
|
|
roadEdgeInfo.vectorId = roadEdge1.vectorId;
|
|
roadEdgeInfo.vectorId = roadEdge1.vectorId;
|
|
roadEdgeInfo.style = roadEdge2.style;
|
|
roadEdgeInfo.style = roadEdge2.style;
|
|
|
|
+ roadEdgeInfo.weight = roadEdge2.weight;
|
|
roadEdgeInfo.start = { x: roadEdge2.start.x, y: roadEdge2.start.y };
|
|
roadEdgeInfo.start = { x: roadEdge2.start.x, y: roadEdge2.start.y };
|
|
roadEdgeInfo.end = { x: roadEdge2.end.x, y: roadEdge2.end.y };
|
|
roadEdgeInfo.end = { x: roadEdge2.end.x, y: roadEdge2.end.y };
|
|
roadEdgeInfo.parent = roadEdge2.parent;
|
|
roadEdgeInfo.parent = roadEdge2.parent;
|
|
@@ -488,9 +411,7 @@ export default class HistoryUtil {
|
|
x: curveRoadPoint2.position.x,
|
|
x: curveRoadPoint2.position.x,
|
|
y: curveRoadPoint2.position.y,
|
|
y: curveRoadPoint2.position.y,
|
|
};
|
|
};
|
|
- curveRoadPointInfo.parent = JSON.parse(
|
|
|
|
- JSON.stringify(curveRoadPoint2.parent)
|
|
|
|
- );
|
|
|
|
|
|
+ curveRoadPointInfo.parent = JSON.parse(JSON.stringify(curveRoadPoint2.parent));
|
|
|
|
|
|
curveRoadPointInfo.index = curveRoadPoint2.index;
|
|
curveRoadPointInfo.index = curveRoadPoint2.index;
|
|
this.setCurveRoadPointInfo(curveRoadPointInfo);
|
|
this.setCurveRoadPointInfo(curveRoadPointInfo);
|
|
@@ -507,16 +428,12 @@ export default class HistoryUtil {
|
|
x: curveRoadEdge2.end.x,
|
|
x: curveRoadEdge2.end.x,
|
|
y: curveRoadEdge2.end.y,
|
|
y: curveRoadEdge2.end.y,
|
|
};
|
|
};
|
|
- curveRoadEdgeInfo.points = JSON.parse(
|
|
|
|
- JSON.stringify(curveRoadEdge2.points)
|
|
|
|
- );
|
|
|
|
- curveRoadEdgeInfo.curves = JSON.parse(
|
|
|
|
- JSON.stringify(curveRoadEdge2.curves)
|
|
|
|
- );
|
|
|
|
|
|
+ curveRoadEdgeInfo.points = JSON.parse(JSON.stringify(curveRoadEdge2.points));
|
|
|
|
+ curveRoadEdgeInfo.curves = JSON.parse(JSON.stringify(curveRoadEdge2.curves));
|
|
curveRoadEdgeInfo.parent = curveRoadEdge2.parent;
|
|
curveRoadEdgeInfo.parent = curveRoadEdge2.parent;
|
|
curveRoadEdgeInfo.style = curveRoadEdge2.style;
|
|
curveRoadEdgeInfo.style = curveRoadEdge2.style;
|
|
curveRoadEdgeInfo.weight = curveRoadEdge2.weight;
|
|
curveRoadEdgeInfo.weight = curveRoadEdge2.weight;
|
|
- curveRoadEdgeInfo.roadSide == curveRoadEdge2.roadSide
|
|
|
|
|
|
+ // curveRoadEdgeInfo.roadSide == curveRoadEdge2.roadSide
|
|
this.setCurveRoadEdgeInfo(curveRoadEdgeInfo);
|
|
this.setCurveRoadEdgeInfo(curveRoadEdgeInfo);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -532,34 +449,19 @@ export default class HistoryUtil {
|
|
curveRoadInfo.way = curveRoad2.way;
|
|
curveRoadInfo.way = curveRoad2.way;
|
|
if (curveRoad2.way == Constant.oneWay) {
|
|
if (curveRoad2.way == Constant.oneWay) {
|
|
curveRoadInfo.singleCurveRoadWidth = curveRoad2.singleCurveRoadWidth;
|
|
curveRoadInfo.singleCurveRoadWidth = curveRoad2.singleCurveRoadWidth;
|
|
- curveRoadInfo.singleCurveRoadDrivewayCount =
|
|
|
|
- curveRoad2.singleCurveRoadDrivewayCount;
|
|
|
|
- curveRoadInfo.singleLanes = JSON.parse(
|
|
|
|
- JSON.stringify(curveRoad2.singleLanes)
|
|
|
|
- );
|
|
|
|
- curveRoadInfo.singleLanesCurves = JSON.parse(
|
|
|
|
- JSON.stringify(curveRoad2.singleLanesCurves)
|
|
|
|
- );
|
|
|
|
|
|
+ curveRoadInfo.singleCurveRoadDrivewayCount = curveRoad2.singleCurveRoadDrivewayCount;
|
|
|
|
+ curveRoadInfo.singleLanes = JSON.parse(JSON.stringify(curveRoad2.singleLanes));
|
|
|
|
+ curveRoadInfo.singleLanesCurves = JSON.parse(JSON.stringify(curveRoad2.singleLanesCurves));
|
|
} else if (curveRoad2.way == Constant.twoWay) {
|
|
} else if (curveRoad2.way == Constant.twoWay) {
|
|
curveRoadInfo.leftWidth = curveRoad2.leftWidth;
|
|
curveRoadInfo.leftWidth = curveRoad2.leftWidth;
|
|
curveRoadInfo.rightWidth = curveRoad2.rightWidth;
|
|
curveRoadInfo.rightWidth = curveRoad2.rightWidth;
|
|
curveRoadInfo.leftDrivewayCount = curveRoad2.leftDrivewayCount;
|
|
curveRoadInfo.leftDrivewayCount = curveRoad2.leftDrivewayCount;
|
|
curveRoadInfo.rightDrivewayCount = curveRoad2.rightDrivewayCount;
|
|
curveRoadInfo.rightDrivewayCount = curveRoad2.rightDrivewayCount;
|
|
- curveRoadInfo.midDivide = JSON.parse(
|
|
|
|
- JSON.stringify(curveRoad2.midDivide)
|
|
|
|
- );
|
|
|
|
- curveRoadInfo.leftLanesCurves = JSON.parse(
|
|
|
|
- JSON.stringify(curveRoad2.leftLanesCurves)
|
|
|
|
- );
|
|
|
|
- curveRoadInfo.rightLanesCurves = JSON.parse(
|
|
|
|
- JSON.stringify(curveRoad2.rightLanesCurves)
|
|
|
|
- );
|
|
|
|
- curveRoadInfo.leftLanes = JSON.parse(
|
|
|
|
- JSON.stringify(curveRoad2.leftLanes)
|
|
|
|
- );
|
|
|
|
- curveRoadInfo.rightLanes = JSON.parse(
|
|
|
|
- JSON.stringify(curveRoad2.rightLanes)
|
|
|
|
- );
|
|
|
|
|
|
+ curveRoadInfo.midDivide = JSON.parse(JSON.stringify(curveRoad2.midDivide));
|
|
|
|
+ curveRoadInfo.leftLanesCurves = JSON.parse(JSON.stringify(curveRoad2.leftLanesCurves));
|
|
|
|
+ curveRoadInfo.rightLanesCurves = JSON.parse(JSON.stringify(curveRoad2.rightLanesCurves));
|
|
|
|
+ curveRoadInfo.leftLanes = JSON.parse(JSON.stringify(curveRoad2.leftLanes));
|
|
|
|
+ curveRoadInfo.rightLanes = JSON.parse(JSON.stringify(curveRoad2.rightLanes));
|
|
}
|
|
}
|
|
curveRoadInfo.points = [];
|
|
curveRoadInfo.points = [];
|
|
for (let i = 0; i < curveRoad2.points.length; ++i) {
|
|
for (let i = 0; i < curveRoad2.points.length; ++i) {
|
|
@@ -577,12 +479,8 @@ export default class HistoryUtil {
|
|
x: crossPoint2.position.x,
|
|
x: crossPoint2.position.x,
|
|
y: crossPoint2.position.y,
|
|
y: crossPoint2.position.y,
|
|
};
|
|
};
|
|
- crossPointInfo.edgeInfo1 = JSON.parse(
|
|
|
|
- JSON.stringify(crossPoint2.edgeInfo1)
|
|
|
|
- );
|
|
|
|
- crossPointInfo.edgeInfo2 = JSON.parse(
|
|
|
|
- JSON.stringify(crossPoint2.edgeInfo2)
|
|
|
|
- );
|
|
|
|
|
|
+ crossPointInfo.edgeInfo1 = JSON.parse(JSON.stringify(crossPoint2.edgeInfo1));
|
|
|
|
+ crossPointInfo.edgeInfo2 = JSON.parse(JSON.stringify(crossPoint2.edgeInfo2));
|
|
crossPoint1.edgeInfo1 = JSON.parse(JSON.stringify(crossPoint2.edgeInfo1));
|
|
crossPoint1.edgeInfo1 = JSON.parse(JSON.stringify(crossPoint2.edgeInfo1));
|
|
crossPoint1.edgeInfo2 = JSON.parse(JSON.stringify(crossPoint2.edgeInfo2));
|
|
crossPoint1.edgeInfo2 = JSON.parse(JSON.stringify(crossPoint2.edgeInfo2));
|
|
dataService.addCrossPoint(crossPoint1);
|
|
dataService.addCrossPoint(crossPoint1);
|
|
@@ -629,7 +527,7 @@ export default class HistoryUtil {
|
|
data.type = line.geoType;
|
|
data.type = line.geoType;
|
|
data.style = line.style;
|
|
data.style = line.style;
|
|
data.weight = line.weight;
|
|
data.weight = line.weight;
|
|
- data.zebraCrossStyle = line.zebraCrossStyle
|
|
|
|
|
|
+ data.zebraCrossStyle = line.zebraCrossStyle;
|
|
return data;
|
|
return data;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -734,6 +632,7 @@ export default class HistoryUtil {
|
|
data.end = {};
|
|
data.end = {};
|
|
data.end = JSON.parse(JSON.stringify(roadEdge.end));
|
|
data.end = JSON.parse(JSON.stringify(roadEdge.end));
|
|
data.style = roadEdge.style;
|
|
data.style = roadEdge.style;
|
|
|
|
+ data.weight = roadEdge.weight;
|
|
data.roadSide = roadEdge.roadSide;
|
|
data.roadSide = roadEdge.roadSide;
|
|
return data;
|
|
return data;
|
|
}
|
|
}
|
|
@@ -786,7 +685,7 @@ export default class HistoryUtil {
|
|
data.curves = JSON.parse(JSON.stringify(curveRoadEdge.curves));
|
|
data.curves = JSON.parse(JSON.stringify(curveRoadEdge.curves));
|
|
data.style = curveRoadEdge.style;
|
|
data.style = curveRoadEdge.style;
|
|
data.weight = curveRoadEdge.weight;
|
|
data.weight = curveRoadEdge.weight;
|
|
- data.roadSide == curveRoadEdge.roadSide
|
|
|
|
|
|
+ // data.roadSide == curveRoadEdge.roadSide
|
|
return data;
|
|
return data;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -805,9 +704,7 @@ export default class HistoryUtil {
|
|
if (curveRoad.way == Constant.oneWay) {
|
|
if (curveRoad.way == Constant.oneWay) {
|
|
data.singleCurveRoadWidth = curveRoad.singleRoadWidth;
|
|
data.singleCurveRoadWidth = curveRoad.singleRoadWidth;
|
|
data.singleCurveRoadDrivewayCount = curveRoad.singleRoadDrivewayCount;
|
|
data.singleCurveRoadDrivewayCount = curveRoad.singleRoadDrivewayCount;
|
|
- data.singleLanesCurves = JSON.parse(
|
|
|
|
- JSON.stringify(curveRoad.singleLanesCurves)
|
|
|
|
- );
|
|
|
|
|
|
+ data.singleLanesCurves = JSON.parse(JSON.stringify(curveRoad.singleLanesCurves));
|
|
data.singleLanes = JSON.parse(JSON.stringify(curveRoad.singleLanes));
|
|
data.singleLanes = JSON.parse(JSON.stringify(curveRoad.singleLanes));
|
|
} else if (curveRoad.way == Constant.twoWay) {
|
|
} else if (curveRoad.way == Constant.twoWay) {
|
|
data.leftWidth = curveRoad.leftWidth;
|
|
data.leftWidth = curveRoad.leftWidth;
|
|
@@ -815,12 +712,8 @@ export default class HistoryUtil {
|
|
data.leftDrivewayCount = curveRoad.leftDrivewayCount;
|
|
data.leftDrivewayCount = curveRoad.leftDrivewayCount;
|
|
data.rightDrivewayCount = curveRoad.rightDrivewayCount;
|
|
data.rightDrivewayCount = curveRoad.rightDrivewayCount;
|
|
data.midDivide = JSON.parse(JSON.stringify(curveRoad.midDivide));
|
|
data.midDivide = JSON.parse(JSON.stringify(curveRoad.midDivide));
|
|
- data.leftLanesCurves = JSON.parse(
|
|
|
|
- JSON.stringify(curveRoad.leftLanesCurves)
|
|
|
|
- );
|
|
|
|
- data.rightLanesCurves = JSON.parse(
|
|
|
|
- JSON.stringify(curveRoad.rightLanesCurves)
|
|
|
|
- );
|
|
|
|
|
|
+ data.leftLanesCurves = JSON.parse(JSON.stringify(curveRoad.leftLanesCurves));
|
|
|
|
+ data.rightLanesCurves = JSON.parse(JSON.stringify(curveRoad.rightLanesCurves));
|
|
data.leftLanes = JSON.parse(JSON.stringify(curveRoad.leftLanes));
|
|
data.leftLanes = JSON.parse(JSON.stringify(curveRoad.leftLanes));
|
|
data.rightLanes = JSON.parse(JSON.stringify(curveRoad.rightLanes));
|
|
data.rightLanes = JSON.parse(JSON.stringify(curveRoad.rightLanes));
|
|
}
|
|
}
|
|
@@ -876,7 +769,7 @@ export default class HistoryUtil {
|
|
line.value = lineInfo.value;
|
|
line.value = lineInfo.value;
|
|
line.style = lineInfo.style;
|
|
line.style = lineInfo.style;
|
|
line.weight = lineInfo.weight;
|
|
line.weight = lineInfo.weight;
|
|
- line.zebraCrossStyle = lineInfo.zebraCrossStyle
|
|
|
|
|
|
+ line.zebraCrossStyle = lineInfo.zebraCrossStyle;
|
|
return line;
|
|
return line;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -894,9 +787,7 @@ export default class HistoryUtil {
|
|
curveLine.endId = curveLineInfo.endId;
|
|
curveLine.endId = curveLineInfo.endId;
|
|
curveLine.points = [];
|
|
curveLine.points = [];
|
|
for (let i = 0; i < curveLineInfo.points.length; ++i) {
|
|
for (let i = 0; i < curveLineInfo.points.length; ++i) {
|
|
- curveLine.points[i] = dataService.getCurvePoint(
|
|
|
|
- curveLineInfo.points[i].vectorId
|
|
|
|
- );
|
|
|
|
|
|
+ curveLine.points[i] = dataService.getCurvePoint(curveLineInfo.points[i].vectorId);
|
|
}
|
|
}
|
|
curveLine.curves = JSON.parse(JSON.stringify(curveLineInfo.curves));
|
|
curveLine.curves = JSON.parse(JSON.stringify(curveLineInfo.curves));
|
|
return curveLine;
|
|
return curveLine;
|
|
@@ -928,9 +819,7 @@ export default class HistoryUtil {
|
|
let magnifier = dataService.getMagnifier(magnifierInfo.vectorId);
|
|
let magnifier = dataService.getMagnifier(magnifierInfo.vectorId);
|
|
magnifier.vectorId = magnifierInfo.vectorId;
|
|
magnifier.vectorId = magnifierInfo.vectorId;
|
|
magnifier.position = JSON.parse(JSON.stringify(magnifierInfo.position));
|
|
magnifier.position = JSON.parse(JSON.stringify(magnifierInfo.position));
|
|
- magnifier.popPosition = JSON.parse(
|
|
|
|
- JSON.stringify(magnifierInfo.popPosition)
|
|
|
|
- );
|
|
|
|
|
|
+ magnifier.popPosition = JSON.parse(JSON.stringify(magnifierInfo.popPosition));
|
|
magnifier.photoUrl = magnifierInfo.photoUrl;
|
|
magnifier.photoUrl = magnifierInfo.photoUrl;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -958,7 +847,11 @@ export default class HistoryUtil {
|
|
mathUtil.clonePoint(roadEdge.end, roadEdgeInfo.end);
|
|
mathUtil.clonePoint(roadEdge.end, roadEdgeInfo.end);
|
|
roadEdge.type = roadEdgeInfo.type;
|
|
roadEdge.type = roadEdgeInfo.type;
|
|
roadEdge.style = roadEdgeInfo.style;
|
|
roadEdge.style = roadEdgeInfo.style;
|
|
|
|
+ roadEdge.weight = roadEdgeInfo.weight;
|
|
roadEdge.roadSide = roadEdgeInfo.roadSide;
|
|
roadEdge.roadSide = roadEdgeInfo.roadSide;
|
|
|
|
+ if (roadEdge.roadSide) {
|
|
|
|
+ roadEdge.setRoadSideWidth(roadEdge.roadSide.width);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
setRoadInfo(roadInfo) {
|
|
setRoadInfo(roadInfo) {
|
|
@@ -986,24 +879,19 @@ export default class HistoryUtil {
|
|
}
|
|
}
|
|
|
|
|
|
setCurveRoadPointInfo(curveRoadPointInfo) {
|
|
setCurveRoadPointInfo(curveRoadPointInfo) {
|
|
- let curveRoadPoint = dataService.getCurveRoadPoint(
|
|
|
|
- curveRoadPointInfo.vectorId
|
|
|
|
- );
|
|
|
|
|
|
+ let curveRoadPoint = dataService.getCurveRoadPoint(curveRoadPointInfo.vectorId);
|
|
curveRoadPoint.vectorId = curveRoadPointInfo.vectorId;
|
|
curveRoadPoint.vectorId = curveRoadPointInfo.vectorId;
|
|
mathUtil.clonePoint(curveRoadPoint, curveRoadPointInfo.position);
|
|
mathUtil.clonePoint(curveRoadPoint, curveRoadPointInfo.position);
|
|
- curveRoadPoint.parent = JSON.parse(
|
|
|
|
- JSON.stringify(curveRoadPointInfo.parent)
|
|
|
|
- );
|
|
|
|
|
|
+ curveRoadPoint.parent = JSON.parse(JSON.stringify(curveRoadPointInfo.parent));
|
|
curveRoadPoint.index = curveRoadPointInfo.index;
|
|
curveRoadPoint.index = curveRoadPointInfo.index;
|
|
}
|
|
}
|
|
|
|
|
|
setCurveRoadEdgeInfo(curveRoadEdgeInfo) {
|
|
setCurveRoadEdgeInfo(curveRoadEdgeInfo) {
|
|
- let curveRoadEdge = dataService.getCurveRoadEdge(
|
|
|
|
- curveRoadEdgeInfo.vectorId
|
|
|
|
- );
|
|
|
|
|
|
+ let curveRoadEdge = dataService.getCurveRoadEdge(curveRoadEdgeInfo.vectorId);
|
|
curveRoadEdge.vectorId = curveRoadEdgeInfo.vectorId;
|
|
curveRoadEdge.vectorId = curveRoadEdgeInfo.vectorId;
|
|
mathUtil.clonePoint(curveRoadEdge.start, curveRoadEdgeInfo.start);
|
|
mathUtil.clonePoint(curveRoadEdge.start, curveRoadEdgeInfo.start);
|
|
mathUtil.clonePoint(curveRoadEdge.end, curveRoadEdgeInfo.end);
|
|
mathUtil.clonePoint(curveRoadEdge.end, curveRoadEdgeInfo.end);
|
|
|
|
+ curveRoadEdge.points = [];
|
|
for (let i = 0; i < curveRoadEdgeInfo.points.length; ++i) {
|
|
for (let i = 0; i < curveRoadEdgeInfo.points.length; ++i) {
|
|
curveRoadEdge.points[i] = {};
|
|
curveRoadEdge.points[i] = {};
|
|
mathUtil.clonePoint(curveRoadEdge.points[i], curveRoadEdgeInfo.points[i]);
|
|
mathUtil.clonePoint(curveRoadEdge.points[i], curveRoadEdgeInfo.points[i]);
|
|
@@ -1013,7 +901,7 @@ export default class HistoryUtil {
|
|
curveRoadEdge.type = curveRoadEdgeInfo.type;
|
|
curveRoadEdge.type = curveRoadEdgeInfo.type;
|
|
curveRoadEdge.style = curveRoadEdgeInfo.style;
|
|
curveRoadEdge.style = curveRoadEdgeInfo.style;
|
|
curveRoadEdge.weight = curveRoadEdgeInfo.weight;
|
|
curveRoadEdge.weight = curveRoadEdgeInfo.weight;
|
|
- curveRoadEdge.roadSide == curveRoadEdgeInfo.roadSide
|
|
|
|
|
|
+ // curveRoadEdge.roadSide == curveRoadEdgeInfo.roadSide
|
|
}
|
|
}
|
|
|
|
|
|
setCurveRoadInfo(curveRoadInfo) {
|
|
setCurveRoadInfo(curveRoadInfo) {
|
|
@@ -1023,40 +911,28 @@ export default class HistoryUtil {
|
|
curveRoad.endId = curveRoadInfo.endId;
|
|
curveRoad.endId = curveRoadInfo.endId;
|
|
curveRoad.leftEdgeId = curveRoadInfo.leftEdgeId;
|
|
curveRoad.leftEdgeId = curveRoadInfo.leftEdgeId;
|
|
curveRoad.rightEdgeId = curveRoadInfo.rightEdgeId;
|
|
curveRoad.rightEdgeId = curveRoadInfo.rightEdgeId;
|
|
|
|
+ curveRoad.points = [];
|
|
for (let i = 0; i < curveRoadInfo.points.length; ++i) {
|
|
for (let i = 0; i < curveRoadInfo.points.length; ++i) {
|
|
- curveRoad.points[i] = dataService.getCurveRoadPoint(
|
|
|
|
- curveRoadInfo.points[i].vectorId
|
|
|
|
- );
|
|
|
|
|
|
+ curveRoad.points[i] = dataService.getCurveRoadPoint(curveRoadInfo.points[i].vectorId);
|
|
}
|
|
}
|
|
- //curveRoad.points = JSON.parse(JSON.stringify(curveRoadInfo.points));
|
|
|
|
|
|
+ // curveRoad.points = JSON.parse(JSON.stringify(curveRoadInfo.points));
|
|
curveRoad.curves = JSON.parse(JSON.stringify(curveRoadInfo.curves));
|
|
curveRoad.curves = JSON.parse(JSON.stringify(curveRoadInfo.curves));
|
|
|
|
|
|
if (curveRoad.way == Constant.oneWay) {
|
|
if (curveRoad.way == Constant.oneWay) {
|
|
curveRoad.singleCurveRoadWidth = curveRoadInfo.singleCurveRoadWidth;
|
|
curveRoad.singleCurveRoadWidth = curveRoadInfo.singleCurveRoadWidth;
|
|
- curveRoad.singleCurveRoadDrivewayCount =
|
|
|
|
- curveRoadInfo.singleCurveRoadDrivewayCount;
|
|
|
|
- curveRoad.singleLanesCurves = JSON.parse(
|
|
|
|
- JSON.stringify(curveRoadInfo.singleLanesCurves)
|
|
|
|
- );
|
|
|
|
- curveRoad.singleLanes = JSON.parse(
|
|
|
|
- JSON.stringify(curveRoadInfo.singleLanes)
|
|
|
|
- );
|
|
|
|
|
|
+ curveRoad.singleCurveRoadDrivewayCount = curveRoadInfo.singleCurveRoadDrivewayCount;
|
|
|
|
+ curveRoad.singleLanesCurves = JSON.parse(JSON.stringify(curveRoadInfo.singleLanesCurves));
|
|
|
|
+ curveRoad.singleLanes = JSON.parse(JSON.stringify(curveRoadInfo.singleLanes));
|
|
} else if (curveRoad.way == Constant.twoWay) {
|
|
} else if (curveRoad.way == Constant.twoWay) {
|
|
curveRoad.leftWidth = curveRoadInfo.leftWidth;
|
|
curveRoad.leftWidth = curveRoadInfo.leftWidth;
|
|
curveRoad.rightWidth = curveRoadInfo.rightWidth;
|
|
curveRoad.rightWidth = curveRoadInfo.rightWidth;
|
|
curveRoad.leftDrivewayCount = curveRoadInfo.leftDrivewayCount;
|
|
curveRoad.leftDrivewayCount = curveRoadInfo.leftDrivewayCount;
|
|
curveRoad.rightDrivewayCount = curveRoadInfo.rightDrivewayCount;
|
|
curveRoad.rightDrivewayCount = curveRoadInfo.rightDrivewayCount;
|
|
curveRoad.midDivide = JSON.parse(JSON.stringify(curveRoadInfo.midDivide));
|
|
curveRoad.midDivide = JSON.parse(JSON.stringify(curveRoadInfo.midDivide));
|
|
- curveRoad.leftLanesCurves = JSON.parse(
|
|
|
|
- JSON.stringify(curveRoadInfo.leftLanesCurves)
|
|
|
|
- );
|
|
|
|
- curveRoad.rightLanesCurves = JSON.parse(
|
|
|
|
- JSON.stringify(curveRoadInfo.rightLanesCurves)
|
|
|
|
- );
|
|
|
|
|
|
+ curveRoad.leftLanesCurves = JSON.parse(JSON.stringify(curveRoadInfo.leftLanesCurves));
|
|
|
|
+ curveRoad.rightLanesCurves = JSON.parse(JSON.stringify(curveRoadInfo.rightLanesCurves));
|
|
curveRoad.leftLanes = JSON.parse(JSON.stringify(curveRoadInfo.leftLanes));
|
|
curveRoad.leftLanes = JSON.parse(JSON.stringify(curveRoadInfo.leftLanes));
|
|
- curveRoad.rightLanes = JSON.parse(
|
|
|
|
- JSON.stringify(curveRoadInfo.rightLanes)
|
|
|
|
- );
|
|
|
|
|
|
+ curveRoad.rightLanes = JSON.parse(JSON.stringify(curveRoadInfo.rightLanes));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|