|
|
@@ -1514,9 +1514,13 @@ export class CanvasPhotoEditor {
|
|
|
const layout = this.getItemSize(page.layoutMode);
|
|
|
const coords = this.getCoordinate(0, layout);
|
|
|
|
|
|
- coords.forEach((coord, i) => {
|
|
|
- const photoId = page.list[i];
|
|
|
- const photo = this.photos.find(p => p.id === photoId);
|
|
|
+ coords.forEach((coord, q) => {
|
|
|
+ const photoId = page.list[q];
|
|
|
+ let imgItem = this.photos.find(p => p.id === photoId)
|
|
|
+ const photo = {
|
|
|
+ ...imgItem,
|
|
|
+ ...page.item[q],
|
|
|
+ }
|
|
|
|
|
|
// 相框底板
|
|
|
ctx.fillStyle = "#D9D9D9";
|
|
|
@@ -1712,7 +1716,11 @@ async exportPagesAsImages(paperType = "a4", name, fileType = 'pdf') {
|
|
|
|
|
|
coords.forEach((coord, i) => {
|
|
|
const photoId = page.list[i];
|
|
|
- const photo = this.photos.find((p) => p.id === photoId);
|
|
|
+ let imgItem = this.photos.find(p => p.id === photoId)
|
|
|
+ const photo = {
|
|
|
+ ...imgItem,
|
|
|
+ ...page.item[i],
|
|
|
+ }
|
|
|
|
|
|
ctx.fillStyle = "#D9D9D9";
|
|
|
ctx.fillRect(coord.x, coord.y, coord.width, coord.height);
|