|
|
@@ -957,17 +957,16 @@ export class CanvasPhotoEditor {
|
|
|
ctx.lineWidth = 1 / this.scale
|
|
|
ctx.strokeRect(pageX + layout.x, itemY, layout.width, layout.height)
|
|
|
// 设置填充颜色
|
|
|
- ctx.strokeStyle = '#e5e7eb'
|
|
|
+ if(!this.show){
|
|
|
+ ctx.strokeStyle = '#e5e7eb'
|
|
|
+ }
|
|
|
ctx.fillStyle = photoId?'#fff':'#D9D9D9'; // 黄色
|
|
|
// 绘制填充矩形
|
|
|
ctx.fillRect(pageX + layout.x, itemY, layout.width, layout.height);
|
|
|
// 说明文字占位框
|
|
|
if (this._selectedPageItem && this._selectedPageItem.pageIndex === pageIndex && this._selectedPageItem.index === itemIndex) {
|
|
|
-
|
|
|
- ctx.fillStyle = 'red'; // 黄色
|
|
|
- ctx.strokeStyle = 'red'; // 黄色
|
|
|
- // ctx.strokeStyle = this.selectedPageColor
|
|
|
- ctx.lineWidth = 2 / this.scale
|
|
|
+ ctx.strokeStyle = this.selectedPageColor
|
|
|
+ ctx.lineWidth = 4 * this.scale
|
|
|
ctx.strokeRect(pageX + layout.x - 1, itemY - 1, layout.width + 2, layout.height + 2)
|
|
|
ctx.strokeStyle = '#e5e7eb'
|
|
|
|
|
|
@@ -1559,10 +1558,10 @@ export class CanvasPhotoEditor {
|
|
|
}
|
|
|
|
|
|
// 相框底板
|
|
|
- ctx.fillStyle = "#D9D9D9";
|
|
|
+ ctx.fillStyle = photoId?'#fff':"#D9D9D9";
|
|
|
ctx.fillRect(coord.x, coord.y, coord.width, coord.height);
|
|
|
- ctx.strokeStyle = "#eee";
|
|
|
- ctx.strokeRect(coord.x, coord.y, coord.width, coord.height);
|
|
|
+ // ctx.strokeStyle = "#eee";
|
|
|
+ // ctx.strokeRect(coord.x, coord.y, coord.width, coord.height);
|
|
|
|
|
|
if (photo) {
|
|
|
const img = this.imgCache.get(photo.id);
|
|
|
@@ -1641,7 +1640,10 @@ export class CanvasPhotoEditor {
|
|
|
} catch (err) {
|
|
|
console.error(err);
|
|
|
if (err?.message === 'Invalid string length') {
|
|
|
- alert("图片数量较多导致内存占用过高,建议分段制作再导出。");
|
|
|
+ ElMessageBox.confirm("图片数量较多导致内存占用过高,建议分段制作再导出。", "提示", {
|
|
|
+ // type: "warning",
|
|
|
+ // showClose: false
|
|
|
+ })
|
|
|
} else {
|
|
|
ElMessage.error("导出失败");
|
|
|
}
|
|
|
@@ -1726,10 +1728,10 @@ export class CanvasPhotoEditor {
|
|
|
...page.item[i],
|
|
|
}
|
|
|
|
|
|
- ctx.fillStyle = "#D9D9D9";
|
|
|
+ ctx.fillStyle = photoId?'#fff':"#D9D9D9";
|
|
|
ctx.fillRect(coord.x, coord.y, coord.width, coord.height);
|
|
|
- ctx.strokeStyle = "#eee";
|
|
|
- ctx.strokeRect(coord.x, coord.y, coord.width, coord.height);
|
|
|
+ // ctx.strokeStyle = "#eee";
|
|
|
+ // ctx.strokeRect(coord.x, coord.y, coord.width, coord.height);
|
|
|
|
|
|
if (photo) {
|
|
|
const img = this.imgCache.get(photo.id);
|
|
|
@@ -1902,15 +1904,17 @@ export class CanvasPhotoEditor {
|
|
|
} else {
|
|
|
this.exportPagesAsImages(paperType, name);
|
|
|
}
|
|
|
+ console.log('正在导出1');
|
|
|
}
|
|
|
- async checkIndexing(mes = '此操作将会清除所有标引是否继续?') {
|
|
|
+ async checkIndexing(mes = '此操作将会清除所有标引是否继续?', type = false) {
|
|
|
let selectIndexPage = this.dragPageData.drawing?Math.min(this.dragPageData.index,this.dragPageData.movedIndex):this.selectedPageIndex//拖拽模式判断是否有标引
|
|
|
let newList = this.indexingLineList.filter(ele =>{
|
|
|
- return ele.indexingList.some(item => item.pageIndex > selectIndexPage-1)
|
|
|
+ return ele.indexingList.some(item => type?item.pageIndex > selectIndexPage:item.pageIndex > selectIndexPage-1)
|
|
|
})
|
|
|
if(this.dragPageData.drawing && newList.length){
|
|
|
this.dragPageData.drawing = false;
|
|
|
}
|
|
|
+ console.log(type,this.selectedPageIndex,newList, this.indexingLineList, this.dragPageData.drawing)
|
|
|
let length = this.selectedPageIndex==-1?this.indexingLineList.length:newList.length;
|
|
|
// try {
|
|
|
if (length && await ElMessageBox.confirm(mes, '提示')) {
|