Selaa lähdekoodia

fix:字体回撤问题

jinx 2 vuotta sitten
vanhempi
commit
42eb40aeda

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
server/test/a0k4xu045_202305311600080410/attach/sceneStore


+ 0 - 1
src/graphic/History/Change.js

@@ -272,7 +272,6 @@ export default class Change {
     for (const key in texts) {
       const text = texts[key];
       const lastText = this.lastData.texts[key];
-
       // 不存在意味着增加
       if (!lastText) {
         const item = {

+ 9 - 1
src/graphic/History/HistoryUtil.js

@@ -78,7 +78,9 @@ export default class HistoryUtil {
     if (
       mathUtil.equalPoint(text1.center, text2.center) &&
       text1.value == text2.value &&
-      text1.angle == text2.angle
+      text1.angle == text2.angle && 
+      text1.fontSize == text2.fontSize && 
+      text1.color == text2.color 
     ) {
       return false;
     } else {
@@ -387,6 +389,8 @@ export default class HistoryUtil {
     textInfo.value = text2.value;
     textInfo.center = JSON.parse(JSON.stringify(text2.center));
     textInfo.angle = text2.angle;
+    textInfo.color = text2.color;
+    textInfo.fontSize = text2.fontSize;
     this.setTextInfo(textInfo);
   }
 
@@ -633,6 +637,8 @@ export default class HistoryUtil {
     data.center = {};
     mathUtil.clonePoint(data.center, text.center);
     data.value = text.value;
+    data.fontSize = text.fontSize 
+    data.color = text.color 
     return data;
   }
 
@@ -856,6 +862,8 @@ export default class HistoryUtil {
     text.center = JSON.parse(JSON.stringify(textInfo.center));
     text.value = textInfo.value;
     text.angle = textInfo.angle;
+    text.fontSize = textInfo.fontSize;
+    text.color = textInfo.color;
   }
 
   setMagnifierInfo(magnifierInfo) {