|
|
@@ -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--;
|
|
|
}
|