diff options
Diffstat (limited to 'js/render.js')
| -rw-r--r-- | js/render.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/js/render.js b/js/render.js index 993ba0e..e379ab8 100644 --- a/js/render.js +++ b/js/render.js @@ -21,8 +21,8 @@ function ready(){ loading = false if (window.gif) { frame = gif.frames[0] - w = cc.canvas.width = frame.ctx.canvas.width - h = cc.canvas.height = frame.ctx.canvas.height + actual_w = w = cc.canvas.width = frame.ctx.canvas.width + actual_h = h = cc.canvas.height = frame.ctx.canvas.height for (var i=0, f; f=gif.frames[i]; i++){ f.cloneData = f.ctx.getImageData(0,0,w,h) } @@ -31,8 +31,8 @@ function ready(){ fc = cq(img.width, img.height) fc.drawImage(img, 0, 0) frame = img_frame = { ctx: fc.context } - w = cc.canvas.width = frame.ctx.canvas.width - h = cc.canvas.height = frame.ctx.canvas.height + actual_w = w = cc.canvas.width = frame.ctx.canvas.width + actual_h = h = cc.canvas.height = frame.ctx.canvas.height frame.cloneData = frame.ctx.getImageData(0,0,w,h) } else { @@ -66,8 +66,8 @@ function giveFrame(t){ } function empty_frame(){ - w = w || 400 - h = h || 266 + actual_w = w = w || 400 + actual_h = h = h || 266 var cx = cq(w, h).fillStyle("rgba(255,255,255,255)").fillRect(0,0,w,h) return { ctx: cx.context, cloneData: cx.getImageData(0,0,w,h) } } |
