Skip to content

Commit

Permalink
fix: imgのonloadイベント重複回避
Browse files Browse the repository at this point in the history
  • Loading branch information
haruyan-hopemucci committed Feb 18, 2024
1 parent 4875752 commit e0a6786
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ $(function () {
imgEl.src = base64;
};
fr.readAsDataURL(imageFile);
imgEl.addEventListener("load", () => drawCanvas());
imgEl.onload = () => drawCanvas();
};

const drawCanvas = function (redraw = false) {
Expand Down

0 comments on commit e0a6786

Please sign in to comment.