From 11c49d61ddfbef53fe3be417c6e865270e496d8e Mon Sep 17 00:00:00 2001 From: Jeff Schiller Date: Mon, 14 Sep 2009 01:17:29 +0000 Subject: [PATCH] Better behavior for custom resolutions git-svn-id: http://svg-edit.googlecode.com/svn/trunk@639 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svg-editor.html | 3 +-- editor/svg-editor.js | 7 ++++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/editor/svg-editor.html b/editor/svg-editor.html index 57e76025..b715131f 100644 --- a/editor/svg-editor.html +++ b/editor/svg-editor.html @@ -295,8 +295,7 @@
- - diff --git a/editor/svg-editor.js b/editor/svg-editor.js index e9e6046b..04b37b51 100644 --- a/editor/svg-editor.js +++ b/editor/svg-editor.js @@ -997,7 +997,12 @@ function svg_edit_setup() { alert('Invalid size. Width or height may not be 0.'); return false; } - $('#resolution').val(x+'x'+y); + var newOption = [x,'x',y].join(''); + $("#resolution").val(newOption).attr("selected", "selected"); + if ($("#resolution").val() != newOption) { + $('#resolution').append(''); + $("#resolution").val(newOption).attr("selected", "selected"); + } } } // svgCanvas.setResolution(x,y);