Skip to content

Commit

Permalink
Merge pull request #240 from ZhelinCheng/feature/issues/111
Browse files Browse the repository at this point in the history
feat: Fix the issue of remote images not being able to be cropped.
  • Loading branch information
salgum1114 authored Nov 27, 2023
2 parents ef8008e + fa9e00c commit 113818e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/canvas/handlers/Handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,7 @@ class Handler implements HandlerOptions {
resolve(
obj.setSrc(source, () => this.canvas.renderAll(), {
dirty: true,
crossOrigin: "anonymous"
}) as FabricImage,
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/canvas/handlers/WorkareaHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ class WorkareaHandler {
this.handler.zoomHandler.zoomToPoint(new fabric.Point(center.left, center.top), zoom);
canvas.renderAll();
resolve(workarea);
});
}, { crossOrigin: 'anonymous' });
});
};
if (!source) {
Expand Down

0 comments on commit 113818e

Please sign in to comment.