diff options
Diffstat (limited to 'js/api/gallery.js')
| -rw-r--r-- | js/api/gallery.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/js/api/gallery.js b/js/api/gallery.js index e8af7f1..ae50dc9 100644 --- a/js/api/gallery.js +++ b/js/api/gallery.js @@ -53,7 +53,14 @@ function run_shader(shader_object){ console.log(shader_object) shader_id_root = shader_object.shader_id if ($("#persist-image:checked").length) { + var new_w = parseInt(shader_object.width,10) + var new_h = parseInt(shader_object.width,10) $("#url").val( shader_object.image_url ) + if (new_w && new_h) { + preserve_dimensions = true + w = new_w + h = new_h + } load() } $("#shader").val(shader_object.script) |
