summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/render.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/js/render.js b/js/render.js
index 955f525..7eea965 100644
--- a/js/render.js
+++ b/js/render.js
@@ -26,27 +26,27 @@ function ready(){
status("")
if (window.gif) {
frame = gif.frames[0]
- cc.canvas.width = frame.ctx.canvas.width
- cc.canvas.height = frame.ctx.canvas.height
+ actual_w = cc.canvas.width = frame.ctx.canvas.width
+ actual_h = cc.canvas.height = frame.ctx.canvas.height
if (! preserve_dimensions) {
- actual_w = w = cc.canvas.width
- actual_h = h = cc.canvas.height
+ w = actual_w
+ h = actual_h
}
for (var i=0, f; f=gif.frames[i]; i++){
- f.cloneData = f.ctx.getImageData(0,0,cc.canvas.width,cc.canvas.height)
+ f.cloneData = f.ctx.getImageData(0,0,actual_w,actual_h)
}
}
else if (window.img) {
fc = cq(img.width, img.height)
fc.drawImage(img, 0, 0)
frame = img_frame = { ctx: fc.context }
- cc.canvas.width = frame.ctx.canvas.width
- cc.canvas.height = frame.ctx.canvas.height
+ actual_w = cc.canvas.width = frame.ctx.canvas.width
+ actual_h = cc.canvas.height = frame.ctx.canvas.height
if (! preserve_dimensions) {
- actual_w = w = cc.canvas.width
- actual_h = h = cc.canvas.height
+ w = actual_w
+ h = actual_h
}
- frame.cloneData = frame.ctx.getImageData(0,0,cc.canvas.width,cc.canvas.height)
+ frame.cloneData = frame.ctx.getImageData(0,0,actual_w,actual_h)
}
else {
cc.canvas.width = actual_w = w