diff options
Diffstat (limited to 'js')
| -rw-r--r-- | js/api/gallery.js | 4 | ||||
| -rw-r--r-- | js/render.js | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/js/api/gallery.js b/js/api/gallery.js index ae50dc9..8cb738b 100644 --- a/js/api/gallery.js +++ b/js/api/gallery.js @@ -58,8 +58,8 @@ function run_shader(shader_object){ $("#url").val( shader_object.image_url ) if (new_w && new_h) { preserve_dimensions = true - w = new_w - h = new_h + actual_w = w = new_w + actual_h = h = new_h } load() } diff --git a/js/render.js b/js/render.js index 68554cb..955f525 100644 --- a/js/render.js +++ b/js/render.js @@ -6,6 +6,7 @@ var preserve_dimensions = true; function choose (){ loading = true + preserve_dimensions = false $("#url").val(this.src) loadImage(this.src, ready) reset() @@ -27,7 +28,7 @@ function ready(){ frame = gif.frames[0] cc.canvas.width = frame.ctx.canvas.width cc.canvas.height = frame.ctx.canvas.height - if (preserve_dimensions) { + if (! preserve_dimensions) { actual_w = w = cc.canvas.width actual_h = h = cc.canvas.height } @@ -41,7 +42,7 @@ function ready(){ frame = img_frame = { ctx: fc.context } cc.canvas.width = frame.ctx.canvas.width cc.canvas.height = frame.ctx.canvas.height - if (preserve_dimensions) { + if (! preserve_dimensions) { actual_w = w = cc.canvas.width actual_h = h = cc.canvas.height } |
