|
@@ -22,7 +22,7 @@ export default class HistoryUtil {
|
|
|
}
|
|
|
|
|
|
isDifferentForTags(tag1, tag2) {
|
|
|
- if (mathUtil.equalPoint(tag1.center, tag2.center) && tag1.value == tag2.value) {
|
|
|
+ if (mathUtil.equalPoint(tag1.center, tag2.center) && tag1.value == tag2.value && tag1.color == tag2.color && tag1.fontSize == tag2.fontSize) {
|
|
|
return false
|
|
|
} else {
|
|
|
return true
|
|
@@ -61,7 +61,7 @@ export default class HistoryUtil {
|
|
|
|
|
|
isDifferentForRectangles(rectangle1, rectangle2) {
|
|
|
for(let i=0;i<rectangle1.points.length;++i){
|
|
|
- if(!mathUtil.equalPoint(rectangle1.points[i], rectangle2.points[i])){
|
|
|
+ if(!mathUtil.equalPoint(rectangle1.points[i], rectangle2.points[i]) && rectangle1.color == rectangle2.color){
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
@@ -69,7 +69,7 @@ export default class HistoryUtil {
|
|
|
}
|
|
|
|
|
|
isDifferentForCircles(circle1, circle2) {
|
|
|
- if(!mathUtil.equalPoint(circle1.center, circle2.center)){
|
|
|
+ if(!mathUtil.equalPoint(circle1.center, circle2.center) && circle1.color == circle2.color){
|
|
|
return true;
|
|
|
}
|
|
|
else if(circle1.radius != circle2.radius){
|
|
@@ -86,7 +86,7 @@ export default class HistoryUtil {
|
|
|
}
|
|
|
|
|
|
isDifferentForArrows(arrow1, arrow2) {
|
|
|
- if (mathUtil.equalPoint(arrow1.startPoint, arrow2.startPoint) && mathUtil.equalPoint(arrow1.endPoint, arrow2.endPoint)) {
|
|
|
+ if (mathUtil.equalPoint(arrow1.startPoint, arrow2.startPoint) && mathUtil.equalPoint(arrow1.endPoint, arrow2.endPoint) && arrow1.color == arrow2.color) {
|
|
|
return false
|
|
|
} else {
|
|
|
return true
|
|
@@ -148,7 +148,7 @@ export default class HistoryUtil {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- isDifferentForCustomImage(customImage1, customImage2) {
|
|
|
+ isDifferentForCustomImages(customImage1, customImage2) {
|
|
|
if (customImage1.angle == customImage2.angle && customImage1.scale == customImage2.scale && customImage1.url == customImage2.url) {
|
|
|
return false
|
|
|
} else {
|
|
@@ -162,6 +162,7 @@ export default class HistoryUtil {
|
|
|
wallInfo.vectorId = wall1.vectorId
|
|
|
wallInfo.start = wall2.start
|
|
|
wallInfo.end = wall2.end
|
|
|
+ wallInfo.color = wall2.color
|
|
|
wallService.setWallInfo(wallInfo)
|
|
|
}
|
|
|
|
|
@@ -177,6 +178,8 @@ export default class HistoryUtil {
|
|
|
const tagInfo = {}
|
|
|
tagInfo.vectorId = tag1.vectorId
|
|
|
tagInfo.value = tag2.value
|
|
|
+ tagInfo.color = tag2.color
|
|
|
+ tagInfo.fontSize = tag2.fontSize
|
|
|
tagInfo.center = JSON.parse(JSON.stringify(tag2.center))
|
|
|
tagInfo.points2d = JSON.parse(JSON.stringify(tag2.points))
|
|
|
tagService.setTagInfo(tagInfo)
|
|
@@ -205,20 +208,11 @@ export default class HistoryUtil {
|
|
|
tableService.setTableInfo(tableInfo)
|
|
|
}
|
|
|
|
|
|
- // eslint-disable-next-line no-dupe-class-members
|
|
|
- assignTagFromTag(tag1, tag2) {
|
|
|
- const tagInfo = {}
|
|
|
- tagInfo.vectorId = tag1.vectorId
|
|
|
- tagInfo.value = tag2.value
|
|
|
- tagInfo.center = JSON.parse(JSON.stringify(tag2.center))
|
|
|
- tagInfo.points2d = JSON.parse(JSON.stringify(tag2.points))
|
|
|
- tagService.setTagInfo(tagInfo)
|
|
|
- }
|
|
|
-
|
|
|
assignRectangleFromRectangle(rectangle1, rectangle2) {
|
|
|
const rectangleInfo = {}
|
|
|
rectangleInfo.vectorId = rectangle1.vectorId
|
|
|
rectangleInfo.angle = rectangle2.angle
|
|
|
+ rectangleInfo.color = rectangle2.color
|
|
|
rectangleInfo.points = JSON.parse(JSON.stringify(rectangle2.points))
|
|
|
rectangleService.setRectangleInfo(rectangleInfo)
|
|
|
}
|
|
@@ -227,6 +221,7 @@ export default class HistoryUtil {
|
|
|
const circleInfo = {}
|
|
|
circleInfo.vectorId = circle1.vectorId
|
|
|
circleInfo.radius = circle2.radius
|
|
|
+ circleInfo.color = circle2.color
|
|
|
circleInfo.center = JSON.parse(JSON.stringify(circle2.center))
|
|
|
circleInfo.points = JSON.parse(JSON.stringify(circle2.points))
|
|
|
circleService.setCircleInfo(circleInfo)
|
|
@@ -235,6 +230,7 @@ export default class HistoryUtil {
|
|
|
assignArrowFromArrow(arrow1, arrow2) {
|
|
|
const arrowInfo = {}
|
|
|
arrowInfo.vectorId = arrow1.vectorId
|
|
|
+ arrowInfo.color = arrow2.color
|
|
|
arrowInfo.startPoint = JSON.parse(JSON.stringify(arrow2.startPoint))
|
|
|
arrowInfo.endPoint = JSON.parse(JSON.stringify(arrow2.endPoint))
|
|
|
arrowService.setArrowInfo(arrowInfo)
|
|
@@ -309,6 +305,7 @@ export default class HistoryUtil {
|
|
|
getDataForWall(wall) {
|
|
|
const data = {}
|
|
|
data.id = wall.vectorId
|
|
|
+ data.color = wall.color
|
|
|
data.start = wall.start
|
|
|
data.end = wall.end
|
|
|
data.type = wall.geoType
|
|
@@ -329,6 +326,8 @@ export default class HistoryUtil {
|
|
|
const data = {}
|
|
|
data.id = tag.vectorId
|
|
|
data.type = tag.geoType
|
|
|
+ data.color = tag.color
|
|
|
+ data.fontSize = tag.fontSize
|
|
|
data.center = {}
|
|
|
mathUtil.clonePoint(data.center, tag.center)
|
|
|
data.points = [].concat(tag.points2d)
|
|
@@ -366,6 +365,7 @@ export default class HistoryUtil {
|
|
|
const data = {}
|
|
|
data.id = rectangle.vectorId
|
|
|
data.type = rectangle.geoType
|
|
|
+ data.color = rectangle.color
|
|
|
data.angle = rectangle.angle
|
|
|
data.points = [].concat(rectangle.points)
|
|
|
return data
|
|
@@ -375,6 +375,7 @@ export default class HistoryUtil {
|
|
|
const data = {}
|
|
|
data.id = circle.vectorId
|
|
|
data.type = circle.geoType
|
|
|
+ data.color = circle.color
|
|
|
data.center = {}
|
|
|
mathUtil.clonePoint(data.center, circle.center)
|
|
|
data.points = [].concat(circle.points)
|
|
@@ -386,6 +387,7 @@ export default class HistoryUtil {
|
|
|
const data = {}
|
|
|
data.id = arrow.vectorId
|
|
|
data.type = arrow.geoType
|
|
|
+ data.color = arrow.color
|
|
|
data.startPoint = {}
|
|
|
mathUtil.clonePoint(data.startPoint, arrow.startPoint)
|
|
|
data.endPoint = {}
|