|
@@ -51,7 +51,7 @@ export default class HistoryUtil {
|
|
isDifferentForTexts(text1, text2) {
|
|
isDifferentForTexts(text1, text2) {
|
|
if (
|
|
if (
|
|
mathUtil.equalPoint(text1.center, text2.center) &&
|
|
mathUtil.equalPoint(text1.center, text2.center) &&
|
|
- text1.des == text2.des
|
|
|
|
|
|
+ text1.value == text2.value
|
|
) {
|
|
) {
|
|
return false;
|
|
return false;
|
|
} else {
|
|
} else {
|
|
@@ -96,10 +96,8 @@ export default class HistoryUtil {
|
|
assignTextFromText(text1, text2) {
|
|
assignTextFromText(text1, text2) {
|
|
const textInfo = {};
|
|
const textInfo = {};
|
|
textInfo.vectorId = text1.vectorId;
|
|
textInfo.vectorId = text1.vectorId;
|
|
- textInfo.des = text2.des;
|
|
|
|
|
|
+ textInfo.value = text2.value;
|
|
textInfo.center = JSON.parse(JSON.stringify(text2.center));
|
|
textInfo.center = JSON.parse(JSON.stringify(text2.center));
|
|
- textInfo.points2d = JSON.parse(JSON.stringify(text2.points));
|
|
|
|
- textInfo.adding = false;
|
|
|
|
this.setTextInfo(textInfo);
|
|
this.setTextInfo(textInfo);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -137,8 +135,7 @@ export default class HistoryUtil {
|
|
data.type = text.geoType;
|
|
data.type = text.geoType;
|
|
data.center = {};
|
|
data.center = {};
|
|
mathUtil.clonePoint(data.center, text.center);
|
|
mathUtil.clonePoint(data.center, text.center);
|
|
- data.points = [].concat(text.points2d);
|
|
|
|
- data.des = text.des;
|
|
|
|
|
|
+ data.value = text.value;
|
|
return data;
|
|
return data;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -175,9 +172,7 @@ export default class HistoryUtil {
|
|
let text = dataService.getText(textInfo.vectorId);
|
|
let text = dataService.getText(textInfo.vectorId);
|
|
text.vectorId = textInfo.vectorId;
|
|
text.vectorId = textInfo.vectorId;
|
|
text.center = JSON.parse(JSON.stringify(textInfo.center));
|
|
text.center = JSON.parse(JSON.stringify(textInfo.center));
|
|
- text.points2d = JSON.parse(JSON.stringify(textInfo.points2d));
|
|
|
|
- text.des = textInfo.des;
|
|
|
|
- text.adding = textInfo.adding;
|
|
|
|
|
|
+ text.value = textInfo.value;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|