diff options
author | Jez Ng <me@jezng.com> | 2013-07-10 00:13:56 -0700 |
---|---|---|
committer | Jez Ng <me@jezng.com> | 2013-07-10 15:27:13 -0700 |
commit | a5e793cdbe977e7908512cc0fa5f9b329bcccc06 (patch) | |
tree | 0c2295287addee9d7baabcad20b5e8f50c340933 /src | |
parent | 9e484ca054e5c7b6189d893496c36ea9e4fd43f1 (diff) |
Add workaround for FF.
Diffstat (limited to 'src')
-rw-r--r-- | src/library_sdl.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/library_sdl.js b/src/library_sdl.js index 21738cf5..104dcd53 100644 --- a/src/library_sdl.js +++ b/src/library_sdl.js @@ -1040,7 +1040,9 @@ var LibrarySDL = { else { dstData.ctx.save(); dstData.ctx.scale(x < 0 ? -1 : 1, y < 0 ? -1 : 1); - dstData.ctx.drawImage(srcData.canvas, 0, 0, w, h); + dstData.ctx.drawImage(srcData.canvas, w < 0 ? w : 0, h < 0 ? h : 0, Math.abs(w), Math.abs(h)); + // XXX I think this should work according to the spec, but currently + // fails on FF: dstData.ctx.drawImage(srcData.canvas, 0, 0, w, h); dstData.ctx.restore(); } return ret; |