1
0
tangning 4 روز پیش
والد
کامیت
e2015dbdf4
2فایلهای تغییر یافته به همراه5 افزوده شده و 5 حذف شده
  1. 2 2
      src/view/case/photos/canvas-photo-editor.js
  2. 3 3
      src/view/case/photos/index.vue

+ 2 - 2
src/view/case/photos/canvas-photo-editor.js

@@ -645,7 +645,6 @@ export class CanvasPhotoEditor {
     // 绘制T边
     let startInfo = indexingList[0]
     let endInfo = indexingList[1]
-    console.log('drawGuideLine', indexingList, points)
     ctx.beginPath();
     if (startInfo.count == endInfo.count && startInfo.count == 2 && startInfo.itemIndex == endInfo.itemIndex && points.length == 4) {
       ctx.moveTo(coordinate.x, last.y);
@@ -664,6 +663,7 @@ export class CanvasPhotoEditor {
       this.indexingLineList.push({ points, coordinate, indexingList })
       this.indexingNum = 0
       this.indexingList = []
+      this.saveHistory()
     }
     // drawArrow(ctx, last2.x, last2.y, last.x, last.y, color);
     // this.indexingNum = 0
@@ -1402,7 +1402,7 @@ export class CanvasPhotoEditor {
     });
     this.currentIndex++;
     console.log("saveHistory", this.history, this.currentIndex);
-    if (this.history.length > 5) {
+    if (this.history.length > 6) {
       this.history.shift(); // 删除最早的一条
       this.currentIndex--;
     }

+ 3 - 3
src/view/case/photos/index.vue

@@ -611,9 +611,9 @@ const changeIndexing = async () => {
       index: -1,
       pageIndex: -1,
     };
-    if (indexing.value == false) {
-      editor.value.saveHistory();
-    }
+    // if (indexing.value == false) {
+    //   editor.value.saveHistory();
+    // }
     editor.value.drawAllPages();
   }
 };