Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rendro committed Feb 21, 2017
1 parent ccf92dc commit 70553d2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Readme.md
Expand Up @@ -23,7 +23,11 @@ const ctx = srcEl.getContext('2d');
vintagejs(srcEl, { brightness: 0.2 })
.then(
result => {
ctx.drawImage(result, 0, 0, canvas.width, canvas.height);
const img = new Image();
img.src = result;
img.onload = () => {
ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
};
},
error => {
console.log(`Failed: ${error}`);
Expand Down

0 comments on commit 70553d2

Please sign in to comment.